Uninitialized Object vs Object Initialized to NULL

前端 未结 3 862
自闭症患者
自闭症患者 2020-11-27 13:34

I\'m working in Java.

I commonly setup some objects as such:

public class Foo {
    private SomeObject someName;

    // do stuff

    public void so         


        
3条回答
  •  醉梦人生
    2020-11-27 13:54

    If an Object reference has been declared but not instantiated, its value is null.

提交回复
热议问题