Sreekanth wrote:Edited by: Sreekanth on May 23, 2008 6:07 AM
I want to know the exact difference between them.
What exact mean by Object, Reference and Instance?
Can any one give with example for better idea?
Thanks & Regards
Edited by: Sreekanth on May 23, 2008 6:06 AM
Diablo_Chiru wrote:No, an object is not a variable. Object and instance are almost interchangeable. An object is an instance of a class. A class defines the attributes and operations of a type. An instance of that class--an object--is what you create that has values for those attributes and on which you can execute those operations.
Object - It's the variable which holds the class properties and methods. you can access a class's members and methods by creating an object of that class.(you can access static members/methods with classname)
Instance - It's an object at runtime/execution. The name itself is self explanatory. at an instance the picture of the Object :-)
**Reference* - * It's same as c++. reference is nothing but the address of the variable.Absolutely wrong.