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


Please Help Members By Posting Answers For Below Questions

What is the benefit of Composition over Inheritance?

731


What is a subclass?

729


Is it possible to override private virtual methods?

738


Explain about inheritance in oops?

728


What are the features that are provided to make a program modular?

785


What is Abstract method and how different from Virtual Method?

690


Can a class implement two interfaces having default method with same name and signature?

759


What is meant by inheritance? what are the advantages of inheritance?

722


What is the difference between an Abstract class and Interface?

790


What is the difference between an interface and abstract class?

784


Explain static binding

745


What is composition? Explain the purpose of composition.

748


What is a static method? Why do we need static methods in java 8 interfaces?

893


How many methods are there in the externalizable interface?

749


What are extrinsic and intrinsic connections in object-oriented programming?

720