Java双数组引用

Java双数组引用,java,arrays,variables,reference,double,Java,Arrays,Variables,Reference,Double,第一个问题。我已经发表了评论,我想知道我的术语是否正确 public class Wrapper { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here int[][] intPrimative = new int[3][2];

第一个问题。我已经发表了评论,我想知道我的术语是否正确

public class Wrapper {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int[][] intPrimative = new int[3][2]; 
        //create three pointers to arrays of size two
        System.out.println(intPrimative[2][1]);
        // prints default value 0;
        System.out.println(intPrimative[1]);
        // prints [I@74184b3b the reference to the second array

        Integer[][] intWrap = new Integer[3][2];
        System.out.println(intWrap[2][1]);
        System.out.println(intWrap[2]);
        // prints [Ljava.lang.Integer;@33d88c1f
        // the reference to an Intger array object

    }
}
我想知道我的术语正确吗

public class Wrapper {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int[][] intPrimative = new int[3][2]; 
        //create three pointers to arrays of size two
        System.out.println(intPrimative[2][1]);
        // prints default value 0;
        System.out.println(intPrimative[1]);
        // prints [I@74184b3b the reference to the second array

        Integer[][] intWrap = new Integer[3][2];
        System.out.println(intWrap[2][1]);
        System.out.println(intWrap[2]);
        // prints [Ljava.lang.Integer;@33d88c1f
        // the reference to an Intger array object

    }
}
好吧,因为变量名
intPrimative
似乎要包含术语“primitive”,所以它的拼写不正确

还有,评论

//create three pointers to arrays of size two
反映了不正确的理解和/或不正确的术语,因为术语“指针”未在Java上下文中使用,除了臭名昭著的
NullPointerException
的名称(选择不当)中。代码没有很好地描述为创建任何指针。您所指的位创建了一个由三个
int
数组组成的数组,每个数组的长度为2

另外,你在哪里评论

// prints [I@74184b3b the reference to the second array

最好说它打印第二个数组的字符串值。其中一部分可能是地址,但整个地址既不是地址的引用,也不是地址的表示。您关于打印引用的其他评论也同样错误,或者充其量只是一个糟糕的措辞选择。

您是否要求代码审查?您可以删除您的
//TODO
注释。注释通常位于其描述的行的上方,或位于末尾的同一行。您的prints注释引用很可能会更改每次执行,所以您不想这样做。您的问题是什么?这是关于评论的吗?很抱歉,我不清楚,我想知道引用方面的评论是否可以接受,或者是否需要更正。感谢您指出顶部或侧面的评论。我知道代码的功能,只是不确定我的注释是否是正确的术语。我看不出有什么东西可以感谢别人的帮助。谢谢你,对不起,我的意思是不说指针。我一开始是这样做的,我说了参考资料,但后来改正了印刷品[I@74184b3b现在对第二个数组的引用我想我已经足够接近这个语句了。所以它会打印第二个数组的字符串值。这是我以前没有听说过的东西,所以我会查找它。谢谢!