Mega Code Archive

 
Categories / Java Tutorial / Statement Control
 

The For-Each Version of the for Loop

The general form of the for-each version of the for is shown here: for(type itr-var : iterableObj) statement-block The object referred to by iterableObj must be an array or an object that implements the new Iterable interface.