What is an Object?
Advertisements
Question
What is an Object?
Long Answer
Advertisements
Solution
An Object is an instance of a class in Object-Oriented Programming (OOPS). It is a basic unit of a Java program that represents a real-world entity. An object contains data members (attributes) and member functions (methods) that define its properties and behaviour.
Every object has three main characteristics:
- State: Represents the properties or data of an object.
- Behaviour: Represents the actions performed by an object.
- Identity: Represents the unique identification of an object.
shaalaa.com
Is there an error in this question or solution?
