hi faraz,
I dont know if you are using any
IDE like eclipse, If you do then its very easy to debug and find at runtime
the unique ID's created at runtime for variables and objects.
For eg:
Test aTest1 = new Test();
Test aTest2= new Test();
here aTest1 will have an ID say 34322 and aTest2 something different 34644
but if you execute below statement
aTest2 = aTest1;
after this line if you see both test1 and test2 will point to same reference id 34322
same applies for all other attributes in java.
By,
Ibrahim