Q1. What is Object-Oriented Programming (OOP)?
Answer: Object-Oriented Programming is a programming paradigm based on the concept of
objects. Objects contain data in the form of attributes and methods to operate on that data. OOP
helps in organizing code, improving reusability, and making programs easier to manage and scale.
Q2. What is a Class?
Answer: A class is a blueprint or template used to create objects. It defines properties (variables)
and behaviors (methods) that the objects created from the class will have. It is a fundamental
concept in OOP.
Q3. What is an Object?
Answer: An object is an instance of a class. It represents a real-world entity and contains data and
methods. Objects interact with each other to perform tasks in a program.
Q4. What is Encapsulation?
Answer: Encapsulation is the process of wrapping data and methods into a single unit, i.e., a class.
It restricts direct access to some components and protects data from unauthorized access.
Q5. What is Inheritance?
Answer: Inheritance is a feature where one class acquires the properties and behaviors of another
class. It helps in code reuse and establishes a relationship between classes.
Q6. What is Polymorphism?
Answer: Polymorphism means 'many forms'. It allows methods to perform different tasks based on
the object that is calling them. It can be achieved through method overloading and method
overriding.
Q7. What is Abstraction?
Answer: Abstraction is the concept of hiding internal implementation details and showing only
essential features. It helps in reducing complexity and increasing efficiency.
Q8. What is Method Overloading?
Answer: Method overloading is a feature where multiple methods have the same name but different
parameters. It is an example of compile-time polymorphism.
Q9. What is Method Overriding?
Answer: Method overriding occurs when a subclass provides a specific implementation of a method
that is already defined in its parent class. It is an example of runtime polymorphism.
Q10. What is Constructor?
Answer: A constructor is a special method used to initialize objects. It is automatically called when
an object is created and is used to assign initial values to variables.
Q1. What is Object-Oriented Programming (OOP)?
Answer: Object-Oriented Programming is a programming paradigm based on the concept of
objects. Objects contain data in the form of attributes and methods to operate on that data. OOP
helps in organizing code, improving reusability, and making programs easier to manage and scale.
Q2. What is a Class?
Answer: A class is a blueprint or template used to create objects. It defines properties (variables)
and behaviors (methods) that the objects created from the class will have. It is a fundamental
concept in OOP.
Q3. What is an Object?
Answer: An object is an instance of a class. It represents a real-world entity and contains data and
methods. Objects interact with each other to perform tasks in a program.
Q4. What is Encapsulation?
Answer: Encapsulation is the process of wrapping data and methods into a single unit, i.e., a class.
It restricts direct access to some components and protects data from unauthorized access.
Q5. What is Inheritance?
Answer: Inheritance is a feature where one class acquires the properties and behaviors of another
class. It helps in code reuse and establishes a relationship between classes.
Q6. What is Polymorphism?
Answer: Polymorphism means 'many forms'. It allows methods to perform different tasks based on
the object that is calling them. It can be achieved through method overloading and method
overriding.
Q7. What is Abstraction?
Answer: Abstraction is the concept of hiding internal implementation details and showing only
essential features. It helps in reducing complexity and increasing efficiency.
Q8. What is Method Overloading?
Answer: Method overloading is a feature where multiple methods have the same name but different
parameters. It is an example of compile-time polymorphism.
Q9. What is Method Overriding?
Answer: Method overriding occurs when a subclass provides a specific implementation of a method
that is already defined in its parent class. It is an example of runtime polymorphism.
Q10. What is Constructor?
Answer: A constructor is a special method used to initialize objects. It is automatically called when
an object is created and is used to assign initial values to variables.
Q1. What is Object-Oriented Programming (OOP)?
Answer: Object-Oriented Programming is a programming paradigm based on the concept of
objects. Objects contain data in the form of attributes and methods to operate on that data. OOP
helps in organizing code, improving reusability, and making programs easier to manage and scale.
Q2. What is a Class?
Answer: A class is a blueprint or template used to create objects. It defines properties (variables)
and behaviors (methods) that the objects created from the class will have. It is a fundamental
concept in OOP.
Q3. What is an Object?
Answer: An object is an instance of a class. It represents a real-world entity and contains data and
methods. Objects interact with each other to perform tasks in a program.
Q4. What is Encapsulation?
Answer: Encapsulation is the process of wrapping data and methods into a single unit, i.e., a class.
It restricts direct access to some components and protects data from unauthorized access.
Q5. What is Inheritance?
Answer: Inheritance is a feature where one class acquires the properties and behaviors of another
class. It helps in code reuse and establishes a relationship between classes.
Q6. What is Polymorphism?
Answer: Polymorphism means 'many forms'. It allows methods to perform different tasks based on
the object that is calling them. It can be achieved through method overloading and method
overriding.
Q7. What is Abstraction?
Answer: Abstraction is the concept of hiding internal implementation details and showing only
essential features. It helps in reducing complexity and increasing efficiency.
Q8. What is Method Overloading?
Answer: Method overloading is a feature where multiple methods have the same name but different
parameters. It is an example of compile-time polymorphism.
Q9. What is Method Overriding?
Answer: Method overriding occurs when a subclass provides a specific implementation of a method
that is already defined in its parent class. It is an example of runtime polymorphism.
Q10. What is Constructor?
Answer: A constructor is a special method used to initialize objects. It is automatically called when
an object is created and is used to assign initial values to variables.