A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Joined: Nov 26, 2001
Nov 26, 2001 08:19:00
hi friends. i had a question that which one is more efficient:
for loop or while loop why?
Joined: Sep 29, 2000
Nov 26, 2001 08:30:00
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
I agree. Here's the link:
for and while loops
Infinite looping in 'for' and 'while' loops
Source code for java.util.ArrayList
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015