Hello world in Java 25 can be very different to any earlier version of Java.
void main() {
IO.println("Hello world");
}
That's it, no package, no import, not even having to specify a class.
Even that IO represents a class that was only introduced in Java 25.
If you saw that code in a multi-choice lineup of code that should and should not work in Java 10 years ago you wouldn't dream of regarding it as valid Java.
The main method is also so different to traditional Java. There's no "public", no "static", and no parameter list.
It's still early days, but I'm not a fan.
Comments
Post a Comment