a code snippet
Scanner sc=new Scanner(System.in);
System.out.println("enter size of array");
int size=sc.nextInt();
int[] arr=new int[size];//Is the array arr allocated on heap?
Is there something called dynamic memory allocation for arrays?