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 persistence?
Can an interface contain fields?
Explain about the analysis phase?
Which OOPS concept exposes only the necessary information to the calling functions?
Can you define OOP and principles of OOP?
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?
Why do we separate interface from implementation?
What do you mean by polymorphism?
What is the difference between class inheritance and interface inheritance?
What is the default access modifier for a class,struct and an interface declared directly with a namespace?
Does a class inherit the constructor of its super class?
Define Destructor?
What are the Differentiate between abstraction and encapsulation.
What's the main difference between arraylist / hashmap and vector / hashtable?
Why we use oops concepts? What is its advantage?