迷惑。。。。

xuqiangperson 2002-02-26 02:45:30
What does the following statement do?
Person person2 = null;
a- It declares the variable person2, which currently refers to nothing.
b- It creates a Person object and all its attributes are set to null.
c- It creates a Person object that nothing references.
d- Nothing
...全文
78 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
hanson_yi 2002-02-26
  • 打赏
  • 举报
回复
a:同意liukuncn
Luke_cn 2002-02-26
  • 打赏
  • 举报
回复
a:因为person2=null,所以这只是声明了一个变量,并没有为它分配内存
hello_wyq 2002-02-26
  • 打赏
  • 举报
回复
楼上的,是不是用什么灌水机在灌?
111222 2002-02-26
  • 打赏
  • 举报
回复

只需要人民币20元,

你就可以获得本灌水机的程序和Visual C++源代码,

并获得永久性技术支持。

还等什么?灌水等着你!

就在今夜!元宵佳节!

(可怜我的信誉)
richardshen 2002-02-26
  • 打赏
  • 举报
回复
Person person2;
*** this is just declare., no initialization
Person person2=null;
*** this is just declare, initialize to null
Person person2 = new Person();
*** this is to create.
karma 2002-02-26
  • 打赏
  • 举报
回复
a

23,407

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧