Object-Oriented Programming (OOP) is a programming approach that organizes software around objects rather than functions. An object represents a real-world entity and contains both data (attributes) and behavior (methods). OOP helps create modular, reusable, and maintainable applications.
In a banking application, an Account object can contain attributes such as accountNumber and balance, along with methods like deposit() and withdraw(). Different account types, such as SavingsAccount and CurrentAccount, can inherit common functionality from a base Account class.
class Account {
void display() {
System.out.println("Account Details");
}
}
class SavingsAccount extends Account {
}
public class Main {
public static void main(String[] args) {
SavingsAccount account = new SavingsAccount();
account.display();
}
}A concise interview answer is
Object-Oriented Programming is a programming paradigm that uses objects to model real-world entities. In Java, OOP is based on Encapsulation, Inheritance, Polymorphism, and Abstraction, which help build reusable, maintainable, and scalable applications.
Last updated: 11 November 2026
Previous question: What is public static void main(String[] args) in Java?
Next question: What is inheritance in Java?