Online Java Compiler By
JavaTpoint.com
//import statement import java.lang.reflect.Array; public class ReflectArraygetBooleanExample1 { public static void main(String[] args) { boolean[] sarr = (boolean[]) Array.newInstance(boolean.class, 3); Array.set(sarr, 0, true); Array.set(sarr, 1, false); Array.set(sarr, 2, true); for(int i=0;i
Output