LATEST REVATURE STUDY GUIDE 2024-2025
QUESTIONS WITH 100% CORRECT ANSWERS
What are the 4 pillars of OOP?: AbstractionEncapsulation
Inheritance Polymorphism
What is abstraction?: Abstraction is a process of hiding the implementation details and
showing only functionality to the user. Abstraction lets you focus on whatthe object does
instead of how it does it.
What is an Inheritence?: •A class (child) can gain another class's (parent's)features
(fields and methods) by extending the parent class.
Child is allowed to add own fields and methods
Doesn't inherit private fields or methods
Interfaces are a form of inheritance
Creates an IS-A relationship
What are the different types of Inheritance?: Single InheritanceMultilevel Inheritance
Hierarchical Inheritance Multiple Inheritance
What is a Single Inheritance?: A subclass inherits methods and attributes fromone
superclass
What is a Multilevel Inheritance?: Derived class will be inheriting a base classand acts
as the base class for other classes
What is a Hierarchical Inheritance?: Multiple subclasses inherit from one su-perclass
What is a Multiple Inheritance?: One class can inherit from more than onesuperclass
What is Polymorphism?: The ability for some code structures (method or objectto be
treated as different structures at runtime.
What is Casting?: When a value of one type is assigned another type.
, LATEST REVATURE STUDY GUIDE 2024-2025
QUESTIONS WITH 100% CORRECT ANSWERS
(NewType) myVar
What are the different types of Casting?: UpcastingDowncasting
What is Upcasting?: Storing a reference to an object in a base-class-typed(less specific)
reference variable
Animal firstRef = new Dog(); //upcast
What is Downcasting?: Take a previously upcasted reference and store thatreference in
reference variable that is a type closer to that of the actual object
Dog secRef = (Dog) firstRef; //downcast
What is Encapsulation?: Mechanism of wrapping data (variables) and codeacting on the
data (methods) together as a single unit.
Allows data hiding or restriction of data from being accessed outside of the class directly.
What are the different access modifiers in Encapsulation?: PublicProtected
PrivateDefault
What is the Public access modifier?: Seen by other classes no matter thepackage
What is the Protected access modifier?: Seen by subclasses or by classeswith same
package
What is the Private access modifier?: Seen by same class only
What is the Default access modifier?: Seen by any subclass or class in samepackage
What are Classes?: Template used to instantiate objects. Determines statesand behavio
an object will possess.
What is an Object?: An instance of a class in memory.
QUESTIONS WITH 100% CORRECT ANSWERS
What are the 4 pillars of OOP?: AbstractionEncapsulation
Inheritance Polymorphism
What is abstraction?: Abstraction is a process of hiding the implementation details and
showing only functionality to the user. Abstraction lets you focus on whatthe object does
instead of how it does it.
What is an Inheritence?: •A class (child) can gain another class's (parent's)features
(fields and methods) by extending the parent class.
Child is allowed to add own fields and methods
Doesn't inherit private fields or methods
Interfaces are a form of inheritance
Creates an IS-A relationship
What are the different types of Inheritance?: Single InheritanceMultilevel Inheritance
Hierarchical Inheritance Multiple Inheritance
What is a Single Inheritance?: A subclass inherits methods and attributes fromone
superclass
What is a Multilevel Inheritance?: Derived class will be inheriting a base classand acts
as the base class for other classes
What is a Hierarchical Inheritance?: Multiple subclasses inherit from one su-perclass
What is a Multiple Inheritance?: One class can inherit from more than onesuperclass
What is Polymorphism?: The ability for some code structures (method or objectto be
treated as different structures at runtime.
What is Casting?: When a value of one type is assigned another type.
, LATEST REVATURE STUDY GUIDE 2024-2025
QUESTIONS WITH 100% CORRECT ANSWERS
(NewType) myVar
What are the different types of Casting?: UpcastingDowncasting
What is Upcasting?: Storing a reference to an object in a base-class-typed(less specific)
reference variable
Animal firstRef = new Dog(); //upcast
What is Downcasting?: Take a previously upcasted reference and store thatreference in
reference variable that is a type closer to that of the actual object
Dog secRef = (Dog) firstRef; //downcast
What is Encapsulation?: Mechanism of wrapping data (variables) and codeacting on the
data (methods) together as a single unit.
Allows data hiding or restriction of data from being accessed outside of the class directly.
What are the different access modifiers in Encapsulation?: PublicProtected
PrivateDefault
What is the Public access modifier?: Seen by other classes no matter thepackage
What is the Protected access modifier?: Seen by subclasses or by classeswith same
package
What is the Private access modifier?: Seen by same class only
What is the Default access modifier?: Seen by any subclass or class in samepackage
What are Classes?: Template used to instantiate objects. Determines statesand behavio
an object will possess.
What is an Object?: An instance of a class in memory.