Question about while loop statements. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Question about while loop statements.

for(int x = 1; x <=5; x++) { System.out.println(x); } /* Outputs 1 2 3 4 5 */ x <=5; x is lesser than =5? I dont get it. =5?

21st Feb 2017, 5:54 PM
Opaque Dmr
Opaque Dmr - avatar
1 Answer
+ 4
x less or equals to 5
21st Feb 2017, 6:16 PM
Tamás Barta
Tamás Barta - avatar