Online Java Compiler By
JavaTpoint.com
//import statement import java.lang.reflect.Array; public class ReflectArraygetIntExample1 { public static void main(String[] args) { int[] arr = new int[]{90,89,79}; System.out.println("arr[0] = " + Array.getInt(arr, 0)); System.out.println("arr[1] = " + Array.getInt(arr, 1)); System.out.println("arr[2] = " + Array.getInt(arr, 2)); } }
Output