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
What's the order of call of constructors in inheritiance?
Explain about multiple inheritance?
What is the difference abstract class and interface?
What are abstract methods?
What is the base type from which all structs inherit directly?
Explain about overriding polymorphism?
Why do we separate interface from implementation?
What are all the operators that cannot be overloaded?
Tell me something about abstract classes?
What is the difference between abstract & interface?
Which oops concept exposes only necessary information to the calling functions?
What are extrinsic and intrinsic connections in object-oriented programming?
What is the benefit of using inheritance?
Explain about inheritance?
What is garbage collection(gc)?