Discussions Q&R
Exeption Handling
2 Votes
17 RéponsesCan someone explain this code to me....
class ReverseNumberDemo
{ public static void main(String args[]) {
int num=123456789;
int reversenum =0;
while( num != 0 ) {
reversenum = reversenum * 10;
reversenum = reversenum + num%10;
num = num/10; }
System.out.println("Reverse of specified number is: "+reversenum);
}
}
the thing I don't get is the reversenum part......isn't reversenum=0 so wouldn't reversenum*10=0
0 Vote
8 RéponsesAujourd'hui en vedette
Convert Animated SVG to PNG
1 Votes
My Missing Courses
1 Votes
Font size
0 Votes
Mobile
0 Votes
what's wrong with my code?
2 Votes
Same question
0 Votes
I need help here
1 Votes
What is java language
0 Votes
About SQL application
2 Votes
Please reply me
0 Votes