Java Programming Fundamentals
By Devin Park · Updated May 25, 2026
Question catalog for this preview
Catalog listing of the 5 preview questions for this quiz.
Question 1
What is the output of this Java code?
```java
public class Test {
public static void main(String[] args) {
int i = 0;
while (i < 3) {
System.out.print(i + " ");
i++;
}
}
}
```
Question 2
**Statement:** In Java, the `StringBuilder` class is preferred over `String` concatenation in loops because `String` objects are immutable and each concatenation creates a new `String` object in memory.
Question 3
Which of the following Java statements about **checked vs. unchecked exceptions** is CORRECT?
Question 4
In Java, a class that cannot be instantiated directly and may contain both abstract methods and concrete methods is called an [[blank1]] class.
Question 5
In Java, what does the `volatile` keyword guarantee when applied to a variable?