This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes do...while() statement question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "do...while() statement question" Watch "do...while() statement question" New topic

do...while() statement question

zheng li
Ranch Hand

Joined: Jun 16, 2009
Posts: 56

why while(w < 1) can be put directly after do?
what else can be put there?
Ankit Garg

Joined: Aug 03, 2008
Posts: 9374

This is how the program actually works

Remember, that while in a do-while is followed by a semicolon...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
zheng li
Ranch Hand

Joined: Jun 16, 2009
Posts: 56
thank you.
It is sorta covered in the JavaRanch Style Guide.
subject: do...while() statement question
It's not a secret anymore!