A)
->Enhanced for loop is introduced in jdk 1.5
->it is meant for iterating over an array or a collection.
->it has the fallowing Syntax.
For ( one element type : array name or collection name )
->Enhanced for loop is iterated as no.of times as there are elements in the specified array or collection.
->in each iteration an element of the collection is stored, in the specified variable.
Comments
Post a Comment