Java
Java | News, how-tos, features, reviews, and videos
Sorting Java objects with Comparable and Comparator
Are you looking to sort Java objects in a collection, array, or map? Learn how to use the Comparable and Comparator interfaces and avoid ClassCastExceptions.
JDK 23: The new features in Java 23
Plans for Java 23, due in September, include previews of module import declarations, stream gatherers, structured concurrency, and flexible constructor bodies.
IBM previews watsonx Code Assistant for Enterprise Java Applications
The generative AI-based code assistant is aimed at accelerating Java application lifecycle with capabilities, such as code generation, code explanation, and test generation.
Comparing Java objects with equals() and hashcode()
What is the contract between equals() and hashcode()? Learn how these methods work together when comparing objects in Java.
Oracle extends support for Java 11, Java on Solaris
Oracle will support JDK 11 including JDK 11 on Solaris through at least January 2032, the company confirmed in its Java SE Spring 2024 roadmap update.
Replace Calendar with LocalDate in Java programs
Java's Calendar class had its day, but the newer LocalDate class does much more. Here are seven ways to use LocalDate in your Java programs.
Java 17 is most-used LTS version of Java – report
More than 35% of Java applications are using Java 17 in production, up from 9% in 2023, according to New Relic’s 2024 State of the Java Ecosystem report.
Oracle JDK Mission Control 9 adds dark theme, configurable JVM browser
Tool kit for monitoring, managing, profiling, and troubleshooting Java applications now requires JDK 17 or later to run.
Java proposal would add exception case to switch
Allowing developers to handle an exception from the selector in switch with a case in the switch block would make switch more usable for pattern matching, the proposal says.
Java proposal would streamline module package imports
Allowing entire modules to be imported all at once would eliminate tedious typing and simplify the reuse of modular libraries in Java.
Java services hit hardest by third-party vulnerabilities, report says
State of DevSecOps report finds 90% of Java services susceptible to vulnerabilities in third-party libraries.
Java G1 fix would speed JIT compilation
G1 garbage collector improvement would also reduce the overhead of the JDK’s C2 optimizing compiler, benefiting cloud-based Java deployments.
JetBrains IDEs add AI-powered code autocompletion
JetBrains IDEs introduce full line code completion using a built-in language model, starting with the 2024.1 versions.
JetBrains IntelliJ IDE to add K2 compiler mode
K2 compiler provides significantly faster and more stable Kotlin code highlighting and Kotlin code completion, JetBrains said.
JDK 22: An average Java release, sort of
Java Development Kit 22 contains an average number of new features, but is better than average in other ways. Let’s take a look.
Oracle’s GraalVM backs Java 22
GraalVM for JDK 22 makes most Java 22 features available for Graal just-in-time and Native Image ahead-of-time compilation.
Hot code heap proposal would speed Java execution
OpenJDK draft plan would decrease fragmentation in the JVM code cache and reduce application execution time.
Java 22 brings security enhancements
JDK 22 adds 10 new root CA certificates, a new asymmetric key interface, and a -XshowSettings option for displaying security settings.