Quiz yourself: When are Java objects eligible for garbage collection?

By Mikalai Zaikin Java SE, Quiz

A pirate treasure can be found as long as there’s some map or reference. So too with a Java object.

Quiz yourself: Working with date and time in Java

By Mikalai Zaikin Java SE, Quiz

Java contains a rich set of methods for dealing with date and time operations. This quiz tests your knowledge of that functionality.

Quiz yourself: The scope of variables and dividing by zero

By Mikalai Zaikin Java SE, Quiz

If a mathematical equation’s arguments aren’t accessible, what happens to the math operation?

Quiz yourself: Evaluation order, the assignment operator, and array access in Java

By Mikalai Zaikin Java SE, Quiz

Prepare for a tricky adventure when evaluating expressions that contain arrays.

Quiz yourself: Rules about throwing checked exceptions in Java

By Mikalai Zaikin Java SE, Quiz

What happens when you throw a checked exception? There are some tricky special cases.

Quiz yourself: Initializing enums in Java code

By Mikalai Zaikin Java SE, Quiz

There are rules about initializing enums. You need to know them.

Quiz yourself: Determining eligibility for garbage collection in Java

By Mikalai Zaikin Java SE, Quiz

You never can tell when the Java garbage collector will pick up the trash.

Quiz yourself: The correct syntax of Java lambda parameters

By Mikalai Zaikin Java SE, Quiz

Be sure to know the difference between identifiers and specifiers.

Quiz yourself: Handling overloaded Java methods with arguments and return values

By Mikalai Zaikin Java SE, Quiz

Do you know how the compiler selects which method to invoke when it’s forced to choose due to overloading?

Quiz yourself: Using the SecurityManager class in Java

By Mikalai Zaikin Java SE, Quiz

Be sure to use the checkPermission and doPrivileged methods correctly.

Quiz yourself: Working with abstract classes and default methods in Java

By Mikalai Zaikin Java SE, Quiz

What happens when a default method is hidden and inaccessible?

Quiz yourself: Using subclasses and covariant return types

By Mikalai Zaikin Java SE, Quiz

When overloading a Java method, be careful to specify the appropriate return types.

Quiz yourself: Manipulating Java lists—and views of lists

By Mikalai Zaikin Java SE, Quiz

Is a list unmodifiable? Is it immutable? What about the views of the list?

Quiz yourself: Performing reductions with Java streams using collectors and grouping

By Mikalai Zaikin Java SE, Quiz

The trick is to visualize how stream elements travel along the pipeline.

Quiz yourself: Use Java streams to filter, transform, and process data

By Mikalai Zaikin Java SE, Quiz

The average, sum, and count methods are trickier than they might seem.

Quiz yourself: Annotation usage and shortcuts

By Mikalai Zaikin Java SE

Some acceptable shortcuts for annotations are inconsistent with Java’s usual syntax.