【发布时间】:2013-06-07 15:57:39
【问题描述】:
只是一个简单的问题。
如果有的话,区别是以下作为对象的类字段的声明:
public Account loginaccount = new Account();
对比
public Account loginaccount;
谢谢。
【问题讨论】:
-
第二个版本的loginaccount为null。
-
不同之处在于 - ` = new Account()`。
标签: java class object field creation