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

Monica Mona
Monica Mona

Student of life, and a lifelong learner

Updated on: 19-Feb-2020

386 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements