Creating array dynamically

In this post I will explain how to create array dynamically with an example. This is useful when we don’t know the type of array until runtime. Main code 1 package reflection; 2 3 import java.lang.reflect.Array; 4 5 public class ArraysDemo { 6 public static void main(String[] args) { 7 //Creating single dimension array 8…… Continue reading Creating array dynamically