+ 1
Why array value doesn't get assigned?
I'm new to java Sample input 123 array gets 000 but It should be 321 ? https://code.sololearn.com/c1vjRLqO9Vx8/#java
3 Réponses
+ 3
Switch these two lines, like this:
System.out.println(arr[i]);
i++;
Then it will work.
+ 3
You are printing values that haven't been changed yet
+ 1
Thanks👍