Another great loop idea
-
Found another loop digging through looking for something.
Iterator i = foos.iterator();
while (i.hasNext()) {
i.next();
}Elephant elephant elephant, sunshine sunshine sunshine
-
What's the problem? The loop is twice as fast...
You always obtain more by being rather polite and armed than polite only.
I prefer Vivian Stanshall's (Bonzo Dog Doo Dah Band) take on your sig: Neil Innes remembers that the band were reportedly stopped by a local U.S. sheriff and asked if they were carrying any firearms or drugs. When they denied both, the officer asked how they were going to defend themselves. Stanshall piped up from the back of the minibus, "With good manners!"
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
-
Found another loop digging through looking for something.
Iterator i = foos.iterator();
while (i.hasNext()) {
i.next();
}Elephant elephant elephant, sunshine sunshine sunshine
That makes sense in the given content :)
void DoNothing() {
Iterator i = foos.iterator();
while (i.hasNext()) {
i.next();
}
}Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander