aspose file tools*
The moose likes Beginning Java and the fly likes loops Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "loops" Watch "loops" New topic
Author

loops

jandost khoso
Greenhorn

Joined: Nov 26, 2001
Posts: 6
hi friends. i had a question that which one is more efficient:
for loop or while loop why?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
This has been discussed several times in the "performance" forum and the summary is : there is no basic difference in speed. Therefore make your choice based on function.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: loops