by Kototama · 3y ago · 0 comments
class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }
to start a nice journey into programming, right?
https://medium.com/@shwetha.hey/java-21-no-more-public-stati...
Also you can do
new {
System.out.println("Hello, world!");
}But I had to look after your comment and Java can cope with no package declaration! https://stackoverflow.com/questions/2335211/what-is-the-defa...