jQuery in Action, 2nd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Do while loop on the exam Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Do while loop on the exam" Watch "Do while loop on the exam" New topic
Author

Do while loop on the exam

Jason Stortz
Ranch Hand

Joined: Jan 11, 2001
Posts: 68
Peers and Mentors,
I have read and been told by a few sources that it is considered "poor" practice to program with a do-while loop. I have found in my time programming that I could always do it with a different loop just as well, and have had VERY little chance to use it.
So, between these two concepts (if you buy into them I suppose) I want to know if do-while loop is usually hit upon during the exam? I have fundamental knowledge of it and how to use it, but have many of you certified people out there seen it on the test? Curiosity really drives me ask is all.
Thanks,
Jason
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4092
    
    1
Be assured you may very well get a question on do while loops in the exam. If so concider yourself lucky as it will probably deal with the difference between "while" and "do while" , which brings us to your main point. While it is true that you may never use a do while in one of your programs, it is just as likely that you will thank god for its existance someday. The thing about a do while loop, as you know, is that it is guaranteed to execute once. Even if you say do while false. Use your imagination and you will see how this could be a godsend.


SCJP
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Do while loop on the exam
 
Similar Threads
StackOverflowError when trying to use threads
creating a bar graph
how to get a string of parameters from a http servlet and pass it to stored procedure
Nested while loop inside do...while loop?
loop condition query