💻 Coding Interview Questions
1️⃣ What is an object?
Answer: An instance of a class containing data and methods.
2️⃣ What is a class?
Answer: A blueprint used to create objects.
3️⃣ What is OOP?
Answer: Object-Oriented Programming; it organizes code using objects and classes.
4️⃣ Name the four pillars of OOP.
Answer: Encapsulation, Inheritance, Polymorphism, Abstraction.
5️⃣ What is encapsulation?
Answer: Binding data and methods together and restricting direct access.
6️⃣ What is inheritance?
Answer: When a class derives properties and methods from another class.
7️⃣ What is polymorphism?
Answer: One interface, multiple implementations.
8️⃣ What is abstraction?
Answer: Hiding implementation details and showing only essentials.
9️⃣ What is an interface?
Answer: A contract that defines methods without implementation.
🔟 What is method overloading?
Answer: Multiple methods with the same name but different parameters.
Post #1226
807
- ❤ 4