IO class in Java 25

posted Originally published at lnkd.in 1 min read

IO class of Java 25

Java 25 intrroduced a new class called IO in java.lang package, in order to avoid writing longer code when using System.out.println.

I found a difference in the behaviour from the System.out.println

Just try the following main method.

public static void main(String[] args) {
   char[] msg = {'H','e','l','l','o'};
   IO.println(msg);
   System.out.println(msg);
}

I know println in PrintStream handled char[] specially and not just using the toString method.

Can we expect the IO class println method to be consistent with the PrintStream's println?

This is as of

$ java -version
java version "25" 2025-09-16 LTS
Java(TM) SE Runtime Environment (build 25+37-LTS-3491)
Java HotSpot(TM) 64-Bit Server VM (build 25+37-LTS-3491, mixed mode, sharing)

4 Comments

1 vote
1 vote
1 vote
1 vote

More Posts

Sovereign Intelligence: The Complete 25,000 Word Blueprint (Download)

Pocket Portfolioverified - Apr 1

Exception in thread "main" java.lang.arrayindexoutofboundsexception

sabash - Sep 29, 2025

Huffman Encoding Algorithm Using a Greedy Approach in Java

Aditya Pratap Bhuyan - Jun 15, 2025

How to Filter a Collection Using Streams in Java?

Aditya Pratap Bhuyan - Jun 8, 2025

Handling Large Graphs in Java with Streams: Patterns, Challenges, and Best Practices

Aditya Pratap Bhuyan - Jun 8, 2025
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
2 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!