//pass individual element as argument to method public class eg04array { public static void main(String[] args) { int[] numbers = {5, 10, 15, 20}; System.out.println("Enhanced for loop example: "); for (int elevar : numbers) { System.out.print (elevar + " "); } //enhanced for loop System.out.println(""); System.out.println("Pass individual element as argument to method example: "); for (int index = 0; index < numbers.length; index++ ) showValue (numbers[index]); //pass argument to method } public static void showValue(int n) { System.out.print (n + " "); } }