int[] numbers = new int[5];
int[] numbers = {1, 2, 3, 4, 5};
int[] numbers = {1, 2, 3, 4, 5}; int thirdElement = numbers[2]; // thirdElement = 3
int[] numbers = {1, 2, 3, 4, 5}; numbers[2] = 7; // numbers = {1, 2, 7, 4, 5}
int[] numbers = {1, 2, 3, 4, 5}; for (int i = 0; i < numbers.length; i++) { System.out.println(numbers[i]); }The Java Arrays package is part of the core Java API and does not require any external libraries.