Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: インスタンス変数とコンストラクターの作成についてサポートが必要です
2 番目のコンストラクターは、int の配列となる引数を 1 つ受け取ります。このコンストラクターは、引数と同じサイズのインスタンス配列を作成し、整数を引数からインスタンス配列にコピーします。
this.myArray = Arrays.copyOf(nrray,nrray.length);
これにより、渡された int 配列のコピーが作成され、インスタンス配列に割り当てられます。