- 1
what will be the output of :
for(int x =1; x<=5;x++){ System.out.println (x); }
5 Answers
+ 2
Why don't you just try it out in the code playground?
0
Just wanna confirm the output coz i am a beginner
0
it would probably be
1
2
3
4
5
0
I'd recomend you to try it yourself in the code playground, you'll be able to play with different values and learn from it.
And yes you are right, it would print from 1 to 5.
Have fun coding :)
0
thanks