Reputation: 1
As the title.. is this possible? For example:
for(blah blah blah){
code omitted
}
if(variable != null){
go back to start of for;
}
Upvotes: 0
Views: 310
Reputation: 218930
Sure, just use a loop:
while (variable != null) {
for(blah blah blah){
code omitted
}
}
That's the preferred control structure for repeating something while a condition exists. In this case the condition is variable != null
.
Upvotes: 3