What is length in Java Arrays?


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);

Updated on: 19-Feb-2020

433 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements