乱数を作成して配列 (arr) に追加しようとしています。私は答えを探しましたが、それらはすべて機能していないか、古くなっているようです。これが私が試したことです:
int[] arr = {};
int rand = (int) Math.round(Math.random() * 100);
arr = append(arr, rand);
ただし、append の下に「The method append(int[], int) is undefined for the type new ActionListener(){}」という赤い行があるため、これは機能していないようです。助けていただければ幸いです。