<div dir="auto">Yeah it's easy enough to work around, just noting the divergence </div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Jun 28, 2025, 12:42 PM David Alayachew <<a href="mailto:davidalayachew@gmail.com">davidalayachew@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><p dir="ltr">Ah, I see you were referring to System.out. </p><p dir="ltr">Adding that overload makes sense. Though, I would rather it default to doing Arrays.toString, as opposed to just the one overload. That way, all arrays would be printable.</p><p dir="ltr">That was a common pain point for my students. Try to print an array of objects, and they only get an array address. And since they don't recognize that it's an address, it created some confusing bugs, as they think the hexadecimal address string was from previous or following print statements.</p></div>
<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 28, 2025, 12:36 PM David Alayachew <<a href="mailto:davidalayachew@gmail.com" rel="noreferrer noreferrer" target="_blank">davidalayachew@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Is there a char[] overload? I just checked the javadoc for 24 and 25, and I only see Object, String, and no-arg overloads. Not char[].</p>
<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 28, 2025, 6:40 AM Ethan McCue <<a href="mailto:ethan@mccue.dev" rel="noreferrer noreferrer noreferrer" target="_blank">ethan@mccue.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I was going through some examples in my writing and noticed that<br><br>IO.println(new char[] { 'a', 'b' });<br><br>will hit the Object overload of System.out.println and not the char[] overload<br><br>This breaks a few of my examples <a href="https://javabook.mccue.dev/arrays/aliasing" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://javabook.mccue.dev/arrays/aliasing</a></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>