r/javahelp • • Jan 16 '20

Homework Learning Java

Hello everyone, need help on what it is asking and what I should do. Thanks for helping everyone on Reddit! Is it asking what the statement trying to prove?

Refer to the below code snippet and explain the control statement:

for(y = 50, y > -50, y -= 5) System.out.println(y);

0 Upvotes

7 comments sorted by

View all comments

Show parent comments

-1

u/Mabe2515 Jan 16 '20

That’s what I thought. It just loops until it’s not true?

1

u/[deleted] Jan 16 '20

[removed] — view removed comment

-1

u/Mabe2515 Jan 16 '20

The reason you know it take away 5 is because y-= 5 correct?

4

u/CurrentWorldliness8 Jan 16 '20

Dude. There are tons of tutorials and websites that explain what a for loop is.