.length array java

Java
let coolCars = ['ford', 'chevy'];
//to find length, use the array's built in method
let length = coolCars.length;
//length == 2./**
* An Example to get the Array Length is Java
*/
public class ArrayLengthJava {
public static void main(String[] args) {
String[] myArray = { "I", "Love", "Music" };
int arrayLength = myArray.length; //array length attribute
System.out.println("The length of the array is: " + arrayLength);
}
}

Source

Also in Java: