Question Bank
1085 approved questions from the community
Attributes in a class store the state of an object.
A default constructor has no parameters and is automatically provided if no constructor is defined.
OOP promotes modularity by organizing code into standalone entities that communicate through public interfaces.
In OOP, methods describe the behaviors or actions that objects can perform.
A constructor has the same name as the class.
Objects have identity, state, and behavior.
Inheritance promotes code reuse by allowing classes to acquire attributes and behaviors from parent classes.
Which access specifier makes class members accessible within the class and its subclasses?
A parameterized constructor accepts parameters for custom initialization.
Which access specifier makes class members globally accessible to all classes?
What is polymorphism in OOP?
What is abstraction in OOP?
What is the purpose of abstraction in OOP?
What is inheritance in OOP?
What is a class in OOP?
What is an object in OOP?
Which access specifier makes class members accessible only within the defining class?
What are the three core characteristics of an object?
What is encapsulation in OOP?
Which of the following are core principles of Object-Oriented Programming? (Select all that apply)