Answers for "reverse a number in java best solution"

1

reverse a integer in java

while(num != 0) 
{
   int digit = num % 10;
   reversed = reversed * 10 + digit;
   num /= 10;
}
Posted by: Guest on August-16-2020

Code answers related to "reverse a number in java best solution"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language