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
Why are outlet connections required in object-oriented programming?
What are the major differences between late and dynamic binding?
Differences between functional programming and object-oriented programming?
What is the difference between a class and an object?
What is diamond inheritance problem? How java 8 solves this problem?
What is the difference between class inheritance and interface inheritance?
Define modularity?
State about java and its relation to object oriented programming?
Which oops concept exposes only necessary information to the calling functions?
How to make a class accessible as a web service?
Which OOPS concept is used as a reuse mechanism?
What are the limitations of oops?
Can encapsulation be called as a security device?
What do you mean by data hiding?
What is the use if instanceof keyword? And how do refer to a current instance of object?