Passing of parameter

primitive types: passing by value
Object : passing by reference, but by the value of reference, not by itsself.
: passing an object reference by value.”

a reference is an int variable whose value is linked to the pointer of an object. When an object is created with new , it is assigned an area in heap, which is represented by the first positon - pointer - of the area. Then the pointer is linked to the object reference. All this means that an object can be linked to many references , but a reference would link to nothing. For example:
Object
o1=null /* which means a reference of Object is defined and name o1, it has value which is not necessarily known by programmer, and o1 is linked to nothing*/
, o2=null
, o3=null
;//end object
o1 =new Object;// an object of Object is created , whose pointer is not necessarily known by programmer, but is linked to the reference 01. */
o2=o1;