Is it at the closing curly bracket, or is it when it gets back to the start of the loop for another repetition?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Is it at the closing curly bracket, or is it when it gets back to the start of the loop for another repetition?
How can you tell when the loop is at the bottom or has returned to the top of the loop? I do not see any way to make use of that difference.
If you don't understand my answer, don't ignore it, ask a question.
I was trying to understand the effect that the continue; keyword has.
I think it actually increments when it reaches the closing of the loop though, because when I use continue to jump from an inner loop, to the end of an outer loop, the inner loop doesn't get incremented when the program gets to the beginning of that loop again, but the outer loop does get incremented.
So also tells me another thing I was wondering: does continue jump to the start of the loop or the end of the loop.
To see what the code does where, you need to read the byte code that is generated by the compiler.
If you don't understand my answer, don't ignore it, ask a question.
FightingIrishman (December 31st, 2021)
That might be a bit beyond my expertise right now, but thanks for the info.
Hey,
The increment expression is invoked after each iteration of the loop.