The hidden gems in Java 16 and Java 17, from Stream.mapMulti() to HexFormat

There’s much more to a new Java release than the well-known JEPs.

Quiz yourself: Implicit and explicit variable context in Java

To properly address any variable, the Java compiler needs to be able to unambiguously determine the context in which it exists.

Quiz yourself: Access to enums

What happens if an enum constructor is marked as public, protected, or private?

Quiz yourself: Mikalai and Simon divide by zero

Does it matter if the division uses integers, floats, or doubles? Yes, it does.

Quiz yourself: Accessibility of private methods in Java

What happens when some classes define private methods—and other classes attempt to access them?

Quiz yourself: The Java FileChannel class

Using a file lock to ensure that only a single instance of an application is running

Quiz yourself: The Java MapUtility class

Null keys? No null keys? Let’s see what the quizmasters say.

Showtime! Java 7 is here

Oracle’s Mark Reinhold talks with Java Magazine about the most important features in Java SE 7.

Quiz yourself: The Optional class and null values in Java

The code is throwing exceptions. What’s the real cause?

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

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

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

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

Quiz yourself: Lambda expressions

Lambdas are essentially expressions that define a class and instantiate an object from that class. Do you know how to use them?

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

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

Quiz yourself: TreeSets, LinkedLists, and ArrayDeques in Java

These three classes are powerful—but they can be tricky when combined.

Quiz yourself: Rules about throwing checked exceptions in Java

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

Even more greatness packed into Java 16, including tools for improving future JVMs

Java Champions love pattern matching for instanceof, records, Stream.toList(), the vector API, the foreign linker API, and the foreign-memory access API.

Quiz yourself: Initializing enums in Java code

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

Quiz yourself: Determining eligibility for garbage collection in Java

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

Quiz yourself: The correct syntax of Java lambda parameters

Be sure to know the difference between identifiers and specifiers.