Online Java Compiler By
JavaTpoint.com
//import statement import java.lang.reflect.Array; public class ReflectArraygetDoubleExample1 { public static void main(String[] args) { double arr[] = { 1.9, 2.7, 3.9 }; for (int i = 0; i < arr.length; i++) { double vl = Array.getDouble(arr, i); System.out.print(vl + " , "); } } }
Output