What is the primary reason the OOP paradigm is used in software development?
To cope with software complexity
Which OOP concept is defined as the process of hiding internal implementation details?
Abstraction
What is the name of the OOP pillar that bundles data and methods into a single unit?
Encapsulation
Modularity is a key strategy for coping with complexity in OOP. (Respond True or False)
True
How many primitive data types are available in Java?
8
What term describes the region of a program where a variable is accessible?
Scope
What is the basic unit of storage in a Java program called?
Variable
Which structure is used to store multiple values of the same type in a single variable?
Array
What do we call a combination of variables, literals, and operators that evaluates to a single value?
Expression
Which control statement is specifically designed to handle multiple branching based on a single value?
switch statement
What is the term for explicitly converting a larger data type to a smaller one?
Casting (or narrowing)
Which jump statement is used to exit a loop prematurely?
break
What are the two primary mechanisms Java provides to implement Abstraction?
Abstract classes and interfaces
What is the term for the automatic conversion of a smaller data type to a larger data type (e.g., int to long)?
Widening (or automatic) conversion
Which control statement ensures that the block of code is executed at least once before the condition is checked?
The do-while loop
In Java arrays, what is the index number used to access the very first element?
0
Which concept allows a class to acquire the properties and behaviors of another class?
Inheritance
What is the resulting data type of a relational expression such as (a < b)?
Boolean
Which jump statement skips the remaining code in the current iteration of a loop and moves to the next iteration?
continue
What do you call a variable that is declared inside a method and is only accessible within that method?
A local variable
What operator is used in Java to find the remainder of a division operation?
The modulo operator (%)
True or False: A class is the physical reality of an object in memory. (Respond True/False & write reason why?)
False (a class is the blueprint/logical template)
What is the term for the period of time during which a variable occupies a location in the computer's memory?
Lifetime
What do you call a concrete, physical instance of a class that exists in memory?
Object
What are the two main components defined within a class that determine an object's state and behavior?
Variables (data) and Methods (behavior)