Created
July 14, 2023 13:31
-
-
Save maxandersen/7ea9c5941b81365e965dbda1ffef20bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//JAVA 21+ | |
//PREVIEW | |
// Make this available in a library somewhere | |
public interface ConsoleApp { | |
default void println(String s) { | |
System.out.println(s); | |
} | |
default void print(String s) { | |
System.out.print(s); | |
} | |
default void printf(String s, Object... args) { | |
System.out.printf(s, args); | |
} | |
} | |
public class main implements ConsoleApp { | |
void main() { | |
print("Hello World!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment