Primitive Types
What does the System.out.print() method do?
Prints output to the console and puts the cursor on a new line
Prints output to the terminal
Prints output to the console without moving the cursor
Prints output to a file provided by the user
What is the boolean result of the expression (5 > 4)?
null
error
false
true
How does utilizing composition in object-oriented programming promote stronger encapsulation compared to inheritance?
By requiring subclasses to redefine parent class methods, ensuring tighter control over inherited features.
Via abstract classes that mandate implementing all inherited abstract methods thereby encapsulating functionality within subclasses.
By allowing control over access to each component's methods separately rather than exposing superclass methods directly in subclasses.
Through polymorphism that permits any subclass instance to be treated as its superclass for generalized method calling.
What do we call small tests designed around specific components of your code as you develop it?
Acceptance tests
Unit tests
System tests
Integration tests
Which of these choices best describes exception handling in Java?
An optional debugging tool provided by integrated development environments (IDEs) only.
A mechanism to manage runtime errors by separating error-handling code from regular code logic.
A process for compiling Java programs that includes automatic fixing of any errors found in code.
A built-in feature that prevents any kind of runtime errors from occurring during program execution.
Java is object-oriented. What does that mean?
Java is resistant to cyber attacks
Java emphasizes methods, objects, and classes
Java can easily connect to the internet and to file systems
Java can run on any device without modification
What distinguishes compile-time polymorphism from run-time polymorphism in relation to method invocation in Java?
Method overloading facilitates compile-time while method overriding enables run-time polymorphism.
Compile-Time uses class inheritance hierarchies whereas Run-Time relies solely on interface implementation.
Static type checking allows for compile-time while continuous reassignment grants run-time capabilities.
The number of parameters in methods determines compile-time versus variable types being considered at run-time.

How are we doing?
Give us your feedback and let us know how we can improve
Which term describes an error in a program that causes it to execute unintended actions?
Feature
Patch
Upgrade
Bug
How might you optimize tail-end recursion in Java implementation calculating very large factorial numbers precisely taking into consideration stack overflow risks usually associated traditional approaches?
Through iterative loop transformation store intermediate results in a BigDecimal object instead of relying solely on system stack memory calls.
Delegating heavy lifting computations to a separate thread and employing concurrency techniques to alleviate the main application workload.
By increasing Xms parameter in JVM startup settings to allocate additional frame space beforehand to prevent overflow.
Utilizing memoization cache for factorials already computed to reuse in future calculations, despite not directly impacting recursion itself.
Considering Object Oriented Programming Principles, what reason would you use polymorphism instead of conditional statements like if-else?
Polymorphism allows code reuse through method overriding which reduces duplication when handling different object types.
Conditional statements are generally more efficient than polymorphism as they do not involve method calls.
Using if-else constructs typically leads to more secure code because specific conditions must be met before execution proceeds further down branches of logic tree structures found within these control flow patterns, unlike dynamic dispatch mechanisms associated with polymorphic behavior where any subclass could potentially trigger unexpected side effects due to lack of strict type enforcement at compile-time stages of development processes.