I am learning java as well android. Almost everything that we can perform by while loop those things we can do in for loop.
I found a simple condition where using w
for is finite, in the sense that it will finish looping when it runs out of elements to loop through....
while can be infinite if a condition isn't met or the loop broken
Edit
My mistake ... for can be infinite ..
for