import org.junit.Test;
public class solution {
@Test
public void testFunc(){
int res = reverseInt(123);
System.out.println("res: "+res);
}
// 反转int型数据
public int reverseInt(int num){
int res=0;
while (num!=0) {
int temp = num%10;
num=num/10;
res=res*10+temp;
}
return res;
}
}