<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged java-25</title>
<link>https://coderlegion.com/tag/java-25</link>
<description>Powered by Question2Answer</description>
<item>
<title>IO class in Java 25</title>
<link>https://coderlegion.com/5484/io-class-in-java-25</link>
<description>&lt;p&gt;&lt;code&gt;IO&lt;/code&gt; class of Java 25&lt;/p&gt;
&lt;p&gt;Java 25 intrroduced a new class called &lt;code&gt;IO&lt;/code&gt; in &lt;code&gt;java.lang&lt;/code&gt; package, in order to avoid writing longer code when using &lt;code&gt;System.out.println&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I found a difference in the behaviour from the &lt;code&gt;System.out.println&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Just try the following main method.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public static void main(String[] args) {
   char[] msg = {'H','e','l','l','o'};
   IO.println(msg);
   System.out.println(msg);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I know &lt;code&gt;println&lt;/code&gt; in &lt;code&gt;PrintStream&lt;/code&gt; handled &lt;code&gt;char[]&lt;/code&gt; specially and not just using the &lt;code&gt;toString&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Can we expect the &lt;code&gt;IO&lt;/code&gt; class &lt;code&gt;println&lt;/code&gt; method to be consistent with the &lt;code&gt;PrintStream&lt;/code&gt;'s &lt;code&gt;println&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;This is as of &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ java -version
java version &quot;25&quot; 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)
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Java</category>
<guid isPermaLink="true">https://coderlegion.com/5484/io-class-in-java-25</guid>
<pubDate>Mon, 22 Sep 2025 13:49:49 +0000</pubDate>
</item>
</channel>
</rss>