Online Java Compiler By
JavaTpoint.com
//import statements import java.lang.reflect.Array; public class ReflectArraygetBooleanExample2 { public static void main(String[] args) { boolean[] arr = (boolean[]) Array.newInstance(boolean.class, 3); for(int j =0;j < arr.length ; j++) { if(j>=2) Array.set(arr, j, false); else Array.set(arr, j, true); } for(int i = 0; i
Output