“Object” vs “Object Variable” in Java?

后端 未结 6 1575
春和景丽
春和景丽 2021-02-01 19:01

I am teaching myself Java, and one of the review exercises in my book asks for the difference between an \"object\" and an \"object variable.\"

I know what an object is

6条回答
  •  一个人的身影
    2021-02-01 19:47

    At university its tought, that an Object Variable is: "a variable whose type is a class, and which holds a reference to an object that is an instance of that class"

    Object thing = new Object();
    

提交回复
热议问题