DEV Community

QUBE
QUBE

Posted on

Java - OOP

Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects that contain data (fields) and behavior (methods). It focuses on designing software that closely represents real-world entities. It is used to:

  • Improves code reusability

  • Enhances maintainability and scalability

  • Makes programs easier to understand and manage

  • Closely models real-world entities

Characteristics of OOP

Class
A Class in Java is a blueprint or template used to create objects. It defines the properties (data) and behaviours (methods) that objects of that class will have.

Object
An Object in Java is an instance of a class that represents a real-world entity. It is used to access the variables and methods defined inside a class.

Inheritance
Inheritance is a core OOP concept in Java that allows one class to acquire the fields and methods of another class using the extends keyword. It represents an relationship between classes.

References:

Java OOP(Object Oriented Programming) Concepts - GeeksforGeeks

Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.

favicon geeksforgeeks.org

Top comments (0)