File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Badass: Making Users Awesome this week in the Game Development 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: 9327

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.
I agree. Here's the link:
subject: do...while() statement question