Syntax error What is length in Java Arrays?

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: 2020-02-19T10:41:06+05:30

686 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements