Week of July 26, 2021 |
|
|
Find the hidden JDK gems. |
|
|
|
|
There’s much more to a new Java release than the well-known JEPs, explains Mohamed Taman. He can’t wait to tell you about JDK 16’s Stream.toList() method, the changes to the line terminator definition, and even bug fixes for when the first argument to Path.of or Paths.get is null. Mohamed gets excited about the java.util.HexFormat class in JDK 17. He even likes to share news about deprecated features.
That’s why we love the guy. Read all about these gems in his article.
The series on Java game development continues by integrating a Raspberry Pi-based joystick controller. And another new article shows how to solve the classic Traveling Salesman computer-science problem in Java. There are also new quizzes to peruse, accessible on the Java Magazine home page.
We hope you enjoy these articles.
Take care, Alan Zeichick Editor in Chief, Java Magazine @zeichick
P.S. Chris Newland, one of the Java Champions, has created a simple tool that parses the OpenJDK pages to build mappings between projects and their associated JEPs. Chris emphasizes that JEPMap is a work in progress that generates some false positives—until he finishes debugging, anyway. You might find the tool, and the source code, interesting to examine. |
|
The newest articles |
The hidden gems in Java 16 and Java 17, from Stream.mapMulti() to HexFormat Each Java release contains many targeted JEPs, which everyone talks about. However, Java releases also include other features, deprecations, removals, enhancements, additions, and bug fixes, explains Mohamed Taman. While they aren’t given the same attention as the major JEPs, those gems can be very significant.
Look out, Duke! Part 2: Control a Java game with Raspberry Pi and a joystick Playing an arcade game using a keyboard is fine—but for the best shoot-em-up experience, you’ll want a joystick. In this article, Frank Delporte extends the simple game built in “Look out, Duke! Part 1” with a real joystick controlled by a Raspberry Pi 4 single-board controller board, JavaFX, FXGL, and Pi4J.
How to solve the classic Traveling Salesman Problem in Java The famous Traveling Salesman computer-science exercise can be thought of as a graph problem. David Kopec explores several approaches toward solving this NP-hard problem using minimum spanning tree (gives the wrong answer) and brute force (too inefficient). You’ll learn about Heap’s algorithm too. |
|
Complimentary subscription to Java Magazine |
Java Magazine is a deep dive into Java and the JVM. Find detailed explanations about the language and the platform written by experts and members of the Java development team.
Join a quarter of a million subscribers in getting useful, authoritative programming information delivered directly to your inbox. |
|
|
|
|