Class-IX Chapter-3
Class-IX Chapter-3
Elementary Concept of
Objects and Classes
What is an object in Java
• An entity that has state and
behavior is known as an
object e.g., chair, bike,
marker, pen, table, car, etc.
• It can be physical or logical
(tangible and intangible).
• The example of an
intangible object is the
banking system.
Object Definitions
• An object is a real-world entity.
• An object is a runtime entity.
• The object is an entity which has state and
behavior.
• The object is an instance of a class.
What is a class in Java
• A class is a group of objects which have common properties.
• It is a template or blueprint from which objects are created.
• It is a logical entity.
• It can't be physical.
• A class in Java can contain:
– Fields
– Methods
– Constructors
– Blocks
– Nested class and interface
Object Encapsulate State and Behaviour