DEV Community

Discussion on: Things wrong with Java

Collapse
 
sreno77 profile image
Scott Reno •

Don't forget that's it's very verbose

Collapse
 
khmarbaise profile image
Karl Heinz Marbaise •

In which way? Do you have examples?

Collapse
 
lownightsnack profile image
Mamoor Jaan Khan •

Yeah true. Write tons of Java for a simple "Hello World." Frustrating

Collapse
 
khmarbaise profile image
Karl Heinz Marbaise •

Really? Tons?

interface Main {
   static void main(String[] args) {
     System.out.println("Hello World");
  }
}
Enter fullscreen mode Exit fullscreen mode

Is that short enough? Apart from that how many times do you write that?

With JDK21 there is a preview to make that even more shorter (openjdk.org/jeps/445) like this:

void main() {
    System.out.println("Hello, World!");
}
Enter fullscreen mode Exit fullscreen mode

Apart from that, is that really important?