aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes doubt pg 340 of k&b Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt pg 340 of k&b" Watch "doubt pg 340 of k&b" New topic
Author

doubt pg 340 of k&b

harinath chakrapani
Ranch Hand

Joined: Jun 11, 2007
Posts: 40
the wordings are:
The enhanced for loop asumes that, barring an early exit from the loop, you'll always loop throught every element of the array. The following discussions of break and continue appy to both the basic and enhanced for loops.


i cant understand this.
any one please explain. thanks in advance

regards,
Harinath chakrapani
Manfred Klug
Ranch Hand

Joined: Jun 04, 2007
Posts: 377
Hi harinath,

the following enhanced for loop

is basically something like this:
Sridher Reddy
Greenhorn

Joined: Mar 27, 2007
Posts: 8
to add to Manfred's explaination...
what the line also means is that, the "enhanced for loop" and the "basic for loop", both will continue to work the way mentioned above unless they encounter any of the
System.exit(0); or break; or continue; statements.


_ ______________________________ _ <br />I'm using jdk1.5.0_12
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt pg 340 of k&b
 
Similar Threads
Extended for loop
problem with enhanced for loop
Enhanced for loop - new to Java 5 or Java 6?
Enhanced for loops
intersting