public class ArrayLengthExample1
{
public static void main(String[] args)
{
//defining an array of type int named num
//the square bracket contain the length of an array
int[] num = new int[10];
//length is an Array attribute that determines the array length
int arrayLength=num.length;
//prints array length
System.out.println("The length of the array is: "+ arrayLength);
}
}