コードスニペットスタックのメモリまたはJavaのヒープにメモリが割り当てられていますか?
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?
アレイ用の動的メモリ割り当てと呼ばれるものがありますか?
*配列「Array」または「ArrayList」の動的メモリ割り当て? – Ravi
https://stackoverflow.com/questions/14837185/how-can-we-dynamically-allocate-and-grow-an-array – nullpointer
ヒープです。 「新しい」という言葉が見えるときはいつも、何かがヒープに乗っています。 –