I was wondering how to express a certain type of for loop in Java.
In Python I would use:
for x in lst1:
return 10
How would I do this in Java?
I know for the range for-loops, I use
for(int i=0; i<100; j++) {
return "asdf"
}
I just want to know how to do the other type of loop
1 Answer