Sometimes the best way to solve a particular programming problem is to choose a specialized language. While our emphasis here at Java Magazine is obviously on Java, there are occasions when Python or R might offer the conceptual model or native functions to do what you need. The GraalVM runtime supports a polyglot approach to development that you might find helpful—or, if not helpful, at least interesting.
Take care, Alan Zeichick Editor in Chief, Java Magazine @zeichick
Use Python and R in your Java applications with GraalVM GraalVM supports Python and R (among other languages), which opens the world of dynamic scripting and data science libraries to Java projects. Tim Felgentreff, Stepan Sindelar, and Lukas Stadler demonstrate how a Java application can be enhanced with the polyglot capabilities of GraalVM.
Simpler object and data serialization using Java records Julia Boes and Chris Hegarty explain how a record class declares some immutable state and commits to an API that matches that state. Record classes give up a freedom that classes usually enjoy—the ability to decouple their API from their internal representation—but in return, record classes become significantly more concise.
Curly Braces #1: Java and a project monorepo In his debut Java Magazine column, “Curly Braces,” Eric Bruno complains that managing Git repositories can be tedious. Why can’t developers have easy-to-use experiences similar to a modern IDE across source code repositories? Well, you can, and that’s the reason for the monorepository movement.
Imagine that you are writing an interactive console application that does the following:
Step 1. Prints a prompt Step 2. Reads a command as input Step 3. If the input was Q, exits; otherwise, executes the specified command and restarts at step 1
Which code construction would be the best option to implement the scenario? Choose one.
Option A: A for loop with a break statement Option B: An enhanced for loop Option C: A while loop with a continue statement Option D: A do/while loop
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.