Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's what I wanted to know too, but all we get is this one line:

> 1: When I was a Freshman in High School I asked a Junior what it meant. He had no clue.

OK... so it's confusing for juniors. A lot of stuff is. I probably didn't know what it all meant when I started either, but so what? You copy and paste it and move on. Eventually it makes sense. Not a big deal.



I don't understand how anyone ever didn't know what this meant. You have a class. It has a static method. The runtime starts your program by calling the method, passing it an array of command-line arguments. What's mysterious about this?


The fact that you have to explain what classes are, and what static methods are, a huge load of information, for a hello world program. And what's worse, it will leave students rightly confused about what the point of the class is, if it only has static members... Making it more likely they don't retain any of the information. Or alternatively, just say "type it exactly like this, don't think about what the magic words mean" which is a great way to ruin programming for people


When you first learn programming, you don't know what a class is, or a method, let alone a static method.

But if you teach people using Java, you have to teach them to write this:

    public class Main {
      public static void main(String[] args) {
        System.out.println("Hello world");
      }
    }
...instead of just:

    print "Hello world"
The latter is easy for a student to understand. With the former, you just have to tell them to use it without understanding it, and that they'll understand it later.


The first book I read on Java managed to explain "public static void main(String[] args)" by the end of the first chapter. It wasn't a long chapter, either.

I don't like Java, and the excessive boilerplate is a big part of that opinion. But it was never nearly as arcane as some people here are making it.


Why there is a class in the first place




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: