用于int []和int [] []的Netbeans警告消息有所不同

时间:2018-11-09 14:44:42

标签: java netbeans

我知道这是一个微不足道的问题,但是Netbeans为什么决定根据我使用int[]还是int[][]来给出不同的“警告”

int[] oneDArray = {1, 2, 3, 4, 5}; // The array is only written to, never read from

int[][] twoDArray = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}}; // Variable twoDArray is not used

Eclipse都将其表示为“ 未使用局部变量的值

IntelliJ给出了两者,因为“ 从未使用变量

0 个答案:

没有答案