What is the difference between an Object , Reference ID , and Reference Variable in Java?

前端 未结 8 835
余生分开走
余生分开走 2020-11-30 13:24

What is difference between the following in java :

  1. Object

  2. Reference ID

  3. Reference Variable

When I see sta

8条回答
  •  失恋的感觉
    2020-11-30 13:51

    It's a simple question...

    emp e=new emp();
    

    Here, e is reference id to the object. emp is the reference variable to the class and your object id different its the combination of state and behaviour..

提交回复
热议问题