理由はありますか
int[] myArray = new int[0];
コンパイルしますか?
このような表現を使用することはありますか?
myArray[0] = 1;
を与えjava.lang.ArrayIndexOutOfBoundsExceptionます。
if (myArray == null) {
System.out.println("myArray is null.");
} else {
System.out.println("myArray is not null.");
}
を与えmyArray is not null.ます。
int[] myArray = new int[0]したがって、よりも優先される理由がわかりませんmyArray = null;。