This example shows how to find the ArrayLength.
ArrayLength.
import java.io.*; import java.util.*; public class ArrayLength { public static void main(String[] args) throws Exception { int arr[] = {1,2,3,4,5}; System.out.println(arr.length); } }