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 is the benefit of Composition over Inheritance?
What is a subclass?
Is it possible to override private virtual methods?
Explain about inheritance in oops?
What are the features that are provided to make a program modular?
What is Abstract method and how different from Virtual Method?
Can a class implement two interfaces having default method with same name and signature?
What is meant by inheritance? what are the advantages of inheritance?
What is the difference between an Abstract class and Interface?
What is the difference between an interface and abstract class?
Explain static binding
What is composition? Explain the purpose of composition.
What is a static method? Why do we need static methods in java 8 interfaces?
How many methods are there in the externalizable interface?
What are extrinsic and intrinsic connections in object-oriented programming?