A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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