• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu

Q&A Discussions

Can 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
java
0 Votes
8 Answers
25th Jun 2016, 8:45 PM
Arsal Azam
Arsal Azam - avatar
Hot today
What Is the most complicated thing you can do
1 Votes
Hello everyone, I want to learn programming, I don't know where to start.
1 Votes
Whyy.
0 Votes
How the operators and commands in this code are executed?
1 Votes
Combination
0 Votes
Somebody knows how to solve the problem finance app. Even my result is like it must be, but still I can't pass it
0 Votes
Will I get the certificate for free if I completed the free course of web development (I am not on pro subscription)
0 Votes
How to start
0 Votes
C# practice
0 Votes
I finished introduction to python
0 Votes