F&A Diskussionen
Class competition
0 Stimmen
4 AntwortenCan 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 Stimmen
8 AntwortenHeute heiß
How to make a 2d game
1 Votes
Html
2 Votes
Detach thread exception
1 Votes
Need a tutor on Java
0 Votes
Error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row:
1 Votes
PYTHON New bee
0 Votes