System.base.stuff.output.out.printfunctions.println
Or so it felt every time you wanted to dump something into the console…
Comment on Anon tries programming in Java
JackbyDev@programming.dev 5 weeks agoThis is getting a little better nowadays.
> cat Hello.java void main() { System.out.println("Hello, World!"); } > java --enable-preview Hello.java Hello, World!
Things to notice:
public static
String[] args
.This still uses preview features though. However, like you demonstrated already, compilation is no longer a required step for simplistic programs like this.
System.base.stuff.output.out.printfunctions.println
Or so it felt every time you wanted to dump something into the console…
Main method is not public static
It must be somewhere under the hood. Otherwise, it wont be callable and it would require an instance of an object to call. Unless the object here is the Java environment?
No String[] args
They are just optional I’m sure, like C and C++. You still need them to read command line arguments.
cashew@lemmy.world 5 weeks ago
Microsoft Java is a one-liner these days.
JackbyDev@programming.dev 5 weeks ago
Image