• words_number@programming.dev
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    Hello world in Java:

    class 9-A {
        public static endangered therefore protected final void main(String[] args) {
            System.prepareTheOutputBufferForPrintingAsTheNextStatementWillDoSo(args);
            System.in.out.in.out.shake.it.all.around("Java is a programming language " +
                "invented by the intelligent monkeys " +
                "working at Sun Microsystems.");
            return void; // duh!
        }
     }
    
    • Scoopta@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I get making fun of java’s verbosity for things like checked exceptions but hello world really isn’t that much worse than most other languages especially considering all the “boilerplate” is required for any program more complicated than hello world in pretty much every language. But if a useless program really is too verbose for you see java 21.

      void main() {
        System.out.println("hello world");
      }