如何从DefaultMutableTreeNode复制整数值?

时间:2018-12-09 16:49:59

标签: java

有人可以帮我吗?

DefaultMutableTreeNode n4 = new DefaultMutableTreeNode(new Integer(4));
DefaultMutableTreeNode n7 = new DefaultMutableTreeNode(9000);

DefaultMutableTreeNode a = n4;
System.out.println("a = "+a);

int b = Integer(n4);
System.out.println("b = "+b);

int c = Integer(n7);
System.out.println("c = "+c);

为什么b和c在其中为零,而只有a具有我想要的值?

我得到a = 4,b = 0和c = 0。

0 个答案:

没有答案