Every object has : state, behavior and identity -
explain
Answer Posted / benjamin jacob
Identity : Every instance of a class should be unique. e.g.
in memory, every object has its own memory address. This is
part of the unique id, other than which a user can have
member variables uniquely identifying the instance of the class.
State : Every object, at any given point of time would have
to have a set of attributes defining its State.
Behavior : Every object based on its state and optionally
identity will have particular behavior.
| Is This Answer Correct ? | 85 Yes | 16 No |
Post New Answer View All Answers
explain the difference between operator overloading and function overloading.
Can we override a method by using same method name and arguments but different return types?
Explain the mechanism of composition?
What is the difference between class inheritance and interface inheritance?
What is Polymorphism, overloading, overriding and virtual?
What is the practical implementation of inner classes?
What is bootstrap, extension and system class loader? Or can you explain primordial class loader?
What is the difference between new and override?
What is the benefit of Composition over Inheritance?
What is an interface?
Explain the term constructor
What is single and multiple inheritance?
If a method definition has been specified in class , its base class , and the interface which the class is implementing, which definition will be picked if we try to access it using interface reference and class object?
Explain OOPS.
What is data encapsulation and what is its significance?