What is length in Java Arrays?

Java 8Object Oriented ProgrammingProgramming

Length is a filed in java, it gives the total number of the elements in a Java array. The length of an array is defined after the array was created.

Integer[] myArray = {23, 93, 56, 92, 39};
System.out.println(myArray.length);
raja
Updated on 19-Feb-2020 10:41:06

Advertisements