Topic: 请求高手一个问题 |
Print this page |
1.请求高手一个问题 | Copy to clipboard |
Posted by: Butterfly8250go Posted on: 2004-05-25 10:58 public class Test{ static int total=10; public static void main(String args[]){ new Test(); } public Test(){ System.out.println(this); System.out.println("In test"); int temp=this.total; if(temp>5){ System.out.println(temp); } } } 程序执行完后,会有以下输出: Test@ad3ba4 In Test 10 请问第一行输出是什么意思,怎么讲? 多谢!!!!!!!!!!!!!! |
2.Re:请求高手一个问题 [Re: Butterfly8250go] | Copy to clipboard |
Posted by: dissip Posted on: 2004-05-26 11:46 class name + @ + instance name (e.g. the memory address of the instance) |
3.Re:请求高手一个问题 [Re: Butterfly8250go] | Copy to clipboard |
Posted by: didongusa Posted on: 2004-05-26 11:59 I think the instance name is a handle actually. A handle is a ptr to a group of pointers. As for what kind of pointers they are, much depends on the design of the JVM. I am not java master, just try to mess the simple thing. |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |