<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hello,</div>

<div>I hope this email finds you well.</div>

<div>I have recently reviewed the draft for the JEP "Implicitly Declared Classes and Instance Main Methods (Third Preview)" and came up with a suggestion for a minor enhancement to the SimpleIO class.</div>

<div>The JEP aims to enhance the accessibility of simple IO actions, primarily by introducing the SimpleIO class to the java.io package with the following signatures:</div>

<div><br/>
<span style="font-family:Courier New,Courier,monospace;">public class SimpleIO {<br/>
    public static void println(Object obj) ...<br/>
    public static void print(Object obj) ...<br/>
    public static String input(String prompt) throws UncheckedIOException ...<br/>
}</span></div>

<div> </div>

<div>One of the proposed functionalities is to allow implicitly declared classes to automatically import the static methods of SimpleIO, thereby simplifying console input and output operations for beginner programmers.</div>

<div>I propose a small addition to the SimpleIO class that would enhance its usability further. Specifically, I suggest modifying the println and print methods to return the passed object, enabling the inlining of print(ln) statements. Here's the proposed modification:</div>

<div> </div>

<div><br/>
<span style="font-family:Courier New,Courier,monospace;">public static <T> T println(T obj) {<br/>
    System.out.println(obj);<br/>
    return obj;<br/>
}<br/>
public static <T> T print(T obj) {<br/>
    System.out.print(obj);<br/>
    return obj;<br/>
}</span></div>

<div> </div>

<div>This enhancement would facilitate constructs such as:</div>

<div><br/>
<span style="font-family:Courier New,Courier,monospace;">return foo<br/>
    ? println(bar())<br/>
    : baz();</span></div>

<div> </div>

<div>This change would particularly benefit beginners who wish to quickly print something without first creating a variable for it. Additionally, users exploring the SimpleIO class would have a very basic exposure to generic methods.</div>

<div>I believe this suggestion aligns with the objectives of the JEP and would enhance the user experience for novice programmers.</div>

<div>Please let me know if this email is the appropriate channel for submitting such suggestions. If not, I would appreciate guidance on the correct procedure.</div>

<div>Thank you for considering my proposal.<br/>
 </div>

<div>Best regards,</div>

<div>Dennis Woithe</div>
</div></div></body></html>