Docsity

JAVA: OBJECT-ORIENTED PROGRAMMING QUESTIONS AND ANSWERS VERIFIED GRADED A+ PASSED ALREADY, Exams of Software Development

Toggle sidebar
bg1
JAVA: OBJECT-ORIENTED
PROGRAMMING QUESTIONS AND
ANSWERS VERIFIED GRADED A+ PASSED
ALREADY |2025|2026
_____ refers to a programming language's ability to process objects
differently depending on their data type or class - CORRECT ANSWER-
polymorphism
A _____ is a blueprint for an object. - CORRECT ANSWER-class
A variable representing an object contains a _____ - CORRECT ANSWER-
Memory Address
If a variable does not contain a reference to a memory address or a
value, then that variable is ____ - CORRECT ANSWER-null
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download JAVA: OBJECT-ORIENTED PROGRAMMING QUESTIONS AND ANSWERS VERIFIED GRADED A+ PASSED ALREADY and more Exams Software Development in PDF only on Docsity!

JAVA: OBJECT-ORIENTED

PROGRAMMING QUESTIONS AND

ANSWERS VERIFIED GRADED A+ PASSED

ALREADY |2025|

_____ refers to a programming language's ability to process objects differently depending on their data type or class - CORRECT ANSWER- polymorphism A _____ is a blueprint for an object. - CORRECT ANSWER-class A variable representing an object contains a _____ - CORRECT ANSWER- Memory Address If a variable does not contain a reference to a memory address or a value, then that variable is ____ - CORRECT ANSWER-null

If you do not define a constructor, your class will have a ______ - CORRECT ANSWER-default constructor The equality operator ( == ) compares the equality of values, even if those values are ______ - CORRECT ANSWER-memory addresses _____ happens when we define a variable in a closure scope with a variable name that is the same as one for a variable we've already defined in an outer scope. - CORRECT ANSWER-Variable shadowing How do you test strings for equality? - CORRECT ANSWER-.equals() Inheritance is a mechanism in which one class can inherit the ______ of another "parent" class - CORRECT ANSWER-fields and methods

Interfaces can be ______ by other interfaces - CORRECT ANSWER- extended The keyword used to inherit an Interface is... - CORRECT ANSWER- implements The keyword used to inherit a class or abstract class is ________ - CORRECT ANSWER-extends ______ is when a subclass redefines a method of it's parent class - CORRECT ANSWER-Overriding ______ are not inherited - CORRECT ANSWER-private and static members To call the constructor of a parent class, you must use the ______ keyword - CORRECT ANSWER-super

The default access modifier is ______ - CORRECT ANSWER-package- private A package-private member of a class is visible to ______ - CORRECT ANSWER-members of the same package A public member of a class is visible to ______ - CORRECT ANSWER- everything A private member of a class is visible to ______ - CORRECT ANSWER- only the defining class A protected member of a class is visible to ______ - CORRECT ANSWER- subclasses and members of the same package

______ and ______ are defined in classes - CORRECT ANSWER-methods and fields What are the four main principles of Object-Oriented Programming? - CORRECT ANSWER-encapsulation, abstraction, inheritance, and polymorphism ______ and ______ can be defined to accept parameters - CORRECT ANSWER-Constructors and methods Applying ____ means that each object should only expose a high-level mechanism for using it. - CORRECT ANSWER-abstraction ______ is when a class has two methods with the same name but different parameter lists - CORRECT ANSWER-Overloading ______ methods do not require an instance of a class to be invoked - CORRECT ANSWER-static

Static methods can only interact with ______ - CORRECT ANSWER-static fields and methods 'Fields' are ______ that are attached to an instance of a class. - CORRECT ANSWER-variables ______ is achieved when each object keeps its state private, inside a class. - CORRECT ANSWER-Encapsulation The ______ method compares the data in objects - CORRECT ANSWER- .equals() The Object class provides three important methods to all of its children: _____, _____, and _____ - CORRECT ANSWER-.equals(), .toString(), .hashCode()