Is it possible for Java foreach to have conditions?
For example,
for(Foo foo : foos && try == true) { //Do something }
Is t
No.
You could use a while loop instead.
Iterator iterator = list.iterator(); while(iterator.hasNext()) { ... }