Java-Array Length

Array Length

In Java, all arrays store the allocated size in a variable named length. We can obtain the length of the array mark using mark.length. This information will be useful in the manipulation of arrays when their sizes are not known.


Program Source

public class Javaapp {
    public static void main(String[] args) {
        int[] array_v1 = {10,30,50,70,90};
        System.out.println("array_v1 length = "+array_v1.length);

One thought on “Java-Array Length

Leave a Comment