Short answer: fresher technical interviews almost always include OOPs (object-oriented programming) questions: the four pillars (encapsulation, abstraction, inheritance, polymorphism), classes and objects, overloading vs overriding, and abstract classes vs interfaces. Prepare a one-line definition and a simple real-world example for each, and be ready to write a tiny code example in your main language. Clear explanations matter more than textbook wording.
Last updated: 1 November 2026
12 OOPs questions to practise
- What is a class and what is an object? A class is a blueprint; an object is a thing built from it. "Car" is a class, your specific car is an object.
- What are the four pillars of OOP? Encapsulation, abstraction, inheritance and polymorphism.
- What is encapsulation? Keeping data and the methods that use it together, and hiding the data behind methods (private fields with getters and setters).
- What is abstraction? Showing only what's needed and hiding the details. You use a car's steering without knowing how it works inside.
- What is inheritance? A class reusing another class's properties and methods. "Dog" inherits from "Animal".
- What is polymorphism? One name, many forms: the same method behaves differently depending on the object.
- Overloading vs overriding? Overloading: same method name, different parameters, in one class (compile time). Overriding: a child class redefines a parent's method (run time).
- Abstract class vs interface? An abstract class can have some implemented methods and state; an interface defines what a class must do. Details differ by language, so know yours.
- What is a constructor? A special method that runs when an object is created, usually to set initial values.
- What are access modifiers? Keywords like public, private and protected that control who can use a field or method.
- What is multiple inheritance, and does your language support it? Inheriting from more than one class. Java doesn't for classes (it uses interfaces); C++ and Python do.
- What is the difference between composition and inheritance? Inheritance is "is a" (a dog is an animal); composition is "has a" (a car has an engine).
How to answer well
- Give the definition in one line, then an everyday example.
- Offer a small code example if they seem interested.
- If you don't know a detail, say what you do know. Our post on what to say when you don't know helps.
For the rest of the technical round, see our technical interview preparation guide and SQL interview questions for freshers.
Rehearse it in an AI mock interview
Explaining OOPs out loud is harder than reading about it. Choose a technical round and practise. In a Sanviora AI mock interview you choose your role and round, and an AI interviewer asks you five questions out loud. You answer by speaking, as you would in the real room. Afterwards you get a report with an overall score and marks for Communication, Confidence, Structure, Relevance and Depth. You also get feedback on each answer and a list of next steps. Take another interview for the same role and the report shows how you've improved. Start an interview.
FAQ
What are the four pillars of OOPs?
Encapsulation, abstraction, inheritance and polymorphism.
Which OOPs questions are asked most in fresher interviews?
The four pillars, overloading vs overriding, and abstract class vs interface come up most often.
Do I need to write code in OOPs questions?
Sometimes. Be ready to write a small class with a constructor and a method in your main language.
Is OOPs asked for non-Java roles too?
Yes. The concepts apply to Python, C++, C# and most modern languages.
