you are viewing a single comment's thread
view the rest of the comments
[–] 28 points 2 years ago (1 child)

If it took anon 30 minutes to write hello world in java, programming is not for anon.

  • source
  • hideshow 2 child comments
  • [–] 11 points 2 years ago (2 children)

    We bow to your wisdom, wise gatekeeper

  • source
  • parent
  • hideshow 4 child comments
  • [–] 3 points 2 years ago (1 child)

    Thank you. If you bothered to read a 5 minutes tutorial instead of posting to 4chan, you could also reach this level of knowledge.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago* (2 children)

    It's like 5 lines of trivial code

  • source
  • parent
  • hideshow 4 child comments
  • And most IDEs will autogenerate it for you.

    That said, I think it highlights everything I hate about Java:

    public class MyClass {

    Why does it need to be a class? I'm not constructing anything?

    public static void main(String[] args) {

    Why is this a method? It should be a top-level function. Also, in most cases, I don't care about the arguments, so those should be left out.

    System.out.println("Hello world!");

    Excuse me, what? Where did System come from, and why does it have an "out" static member? Also, how would I format it if I felt so inclined? So many questions.

    And here are examples from languages I prefer:

    C:

    #include "stdio.h"

    Ok, makes sense, I start with nothing.

    int main() {

    Makes sense that we'd have an entrypoint.

    printf("Hello world");

    Again, pretty simple.

    Python:

    print("Hello world")

    Ok, Python cheats.

    Rust:

    fn main() {

    Ooh, entrypoint.

    println!("Hello world");

    I have to understand macros enough to realize this is special, but that's it.

    In C, Python, and Rust, complexity starts later, whereas Java shoves it down your throat.

  • source
  • parent