Print Array using for-each loop in Java

import java.util.Scanner;

class ab
{

public static void main(String []args)
{
int []arr1 = {1,2,3,3,4,3,5,6,3};
for(int a:arr1)
{
System.out.println(a);
}
}
}