解答:
public static void main(String[] args) { int value = 13287979; System.out.println(reverse(value)); } public static int reverse(int x) { long res = 0; while (x != 0) { res = res * 10 + x % 10; x /= 10; } return (int) res == res ? (int) res : 0; } 解答:97978231
解题思路:
标签:10,reverse,int,反转,整数,static,res,public From: https://www.cnblogs.com/Small-sunshine/p/17986265