35 Program on For Each Loop in Java

Code:

class ForEach
{
public static void main( String args[] )
{
int a[]={1,1,2,3,4,5,5};

for(int i: a  )
{
System.out.println(i);
}

}

}


Output:  

Previous
Next Post »