What exactly happens, in this code? Refrences and variables gets create at compile time and objects gets create at run time. Because of this, when I said 't.i' value which is created at compile time is showing. Method 't.print()' calls at runtime so it is showing value of object Two class. Is it right.