Created
July 14, 2023 13:31
-
-
Save maxandersen/cba8b20f52a8cd8133275480c442dd03 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 | |
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