public class NumberCounter { public static void main(String[] args) { // Example array of numbers int[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // Count the numbers in the array int count = countNumbers(numbers); // Print the result System.out.println("Total numbers in the array: " + count); } // Method to count numbers in an array public static int countNumbers(int[] array) { return array.length; } }