English

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:

  1. State: Represents the properties or data of an object.
  2. Behaviour: Represents the actions performed by an object.
  3. Identity: Represents the unique identification of an object.
shaalaa.com
  Is there an error in this question or solution?
Chapter 4: Objects - EXERCISE [Page 106]

APPEARS IN

Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 4 Objects
EXERCISE | Q 1. (i) | Page 106
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×