//pass an array as argument to method //the actual array itself is not passed, but a reference to the array is passed into the parameter. This means the method has direct access to the original array. import java.util.Scanner; public class eg05array { public static void main(String[] args) { final int ARRAY_SIZE = 3; //size of array int[] numbers = new int[ARRAY_SIZE]; getValues (numbers); //getValue method System.out.println("Here are the numbers that you entered: "); showArray (numbers); //showArray method } public static void getValues(int[] array) { Scanner keyboard = new Scanner(System.in); System.out.println("Enter a series of " + array.length+ " numbers."); for (int index = 0; index < array.length; index++) { System.out.print("Enter number " + (index+1) + ": "); array[index] = keyboard.nextInt(); } } //accepts an array public static void showArray(int[] array) { for (int index = 0; index < array.length; index++) { System.out.print (array[index] + " "); } } }