Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtisQ&A DiscussƵes
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
0 Voto
8 RespostasQuente hoje
String
0 Votes
What is the bug here??
0 Votes
Help me
0 Votes
Does any one know a free app to practice coding, i mean practicing things that you learn from here?
0 Votes
Career in cybersecurity
1 Votes