مهما طال الليل

“If you were able to overlook a genocide and cast a vote for Harris, you already know how a conservative was able to overlook Trump’s extremism and vote for him.” – Historian Robin D.G. Kelley

  • 2 Posts
  • 155 Comments
Joined 11 months ago
cake
Cake day: December 28th, 2023

help-circle

  • I am not in the mood to read a technical document, but I don’t think the resulting binary/byte code should be different between the two “hello world” programs. But then again, why not?

    Without the preview feature enabled, it is not an optional part of the method signature. It specifically looks for a main(String[]) signature.

    Ah ha! So that’s what’s going on here. They almost got it right. They had the potential to make a lot of the boilerplate optional or implicit under relevant circumstances, but instead the language has two explicit switchable modes.

    Can I write a Java application in “preview feature”?


  • 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.

    All in all, these syntax improvements are welcome. I already moved on to Kotlin for Android development though.