Program to print the number of elements present in an array

Source Code:

public class CountElements {
public static void main(String[] args) {
int[] a = {5, 10, 15, 20, 25};
System.out.print(a.length);
}
}

Output: