this post was submitted on 27 Sep 2025
40 points (95.5% liked)

Java

1853 readers
1 users here now

For discussing Java, the JVM, languages that run on the JVM, and other related technologies.

founded 2 years ago
MODERATORS
top 6 comments
sorted by: hot top controversial new old
[–] thenextguy@lemmy.world 8 points 2 months ago (2 children)

You mean this?

Now Java supports top-level instance main methods and class-less compact files. That means now the following declaration is valid:

void main() {
    System.out.println("Hello from Java 25!");
}

Oh come on, please don't kill the public static void main(string args) meme!

[–] Scoopta@programming.dev 1 points 2 months ago (2 children)

I'll be honest, I don't get the point of this feature. It's nice for beginners or for writing small, quick, programs...but for the overwhelming majority of all java code I don't see it being useful

[–] bitcrafter@programming.dev 3 points 2 months ago

Sure, but I think the argument in favor of this feature is that the overwhelming majority of people picking up programming for the first time tend to be beginners, so if it helps them learn the basics before having to grapple with OOP then it is worthwhile.

[–] brian@programming.dev 3 points 2 months ago

the trend of serverless means that people are writing a ton more programs that are smallish single endpoint things. not that a ton of people are using java there, but that was a major motivation for c#

Oh come on, please don't kill the public static void main(string args) meme!