This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes Loops Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Loops" Watch "Loops" New topic


Nath Maniedeo

Joined: Feb 15, 2008
Posts: 29
hi - I'm new. our teacher wrote: "While this kind of for loop does work, it is not as readable as a more traditional loop.
If I use a for loop, I like to see all three sections used."

so, what's a more traditional loop - the while loop? (I thought this was not ideal)

what are the 3 sections of the for loop?
Katrina Owen

Joined: Nov 03, 2006
Posts: 1367
Hi there,

The traditional for loop takes 3 sections:

loop test
a counting expression (often an incrementor)

this usually looks like this:
Nath Maniedeo

Joined: Feb 15, 2008
Posts: 29
thank you!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Loops
jQuery in Action, 3rd edition