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

•

u/desrtfx Out of Coffee error - System halted Jan 16 '20

You explain what you think.

The control statement is the for.

Explain it in detail how it works.

This subreddit is not for getting your work done.

  • Do not ask for or reply with solutions or keys to solutions, rather comment explanations and guides. Comments with solutions will be removed and commenters will automatically be banned for a week.

2

u/[deleted] Jan 16 '20

[removed] — view removed comment

-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.