100 Interview Questions and Answers Basic Concepts What is a class? A class is a blueprint for creating objects, defining attributes (data) and methods (functions). What is an object? An object is an instance of a class, representing a specific entity with state and behavior. What is encapsulation? Encapsulation is the practice of restricting access to certain details of an object, exposing only what is necessary through methods. What is inheritance? Inheritance allows a class (child) to inherit properties and methods from another class (parent), promoting code reuse. What is polymorphism? Polymorphism allows objects of different classes to be treated as objects of a common superclass, enabling method overriding and overloading. Advanced Concepts What is method overriding? Method overriding occurs when a subclass provides a specific implementation of a method already defined in its superclass. What is method overloading? Method overloading allows a class to have multiple methods with t...