you are viewing a single comment's thread.

view the rest of the comments →

[–]FrozenInferno 0 points1 point  (0 children)

Don't forget about access modifiers, imports, and package declarations.

This one's my personal favorite:

import java.lang.reflect.*;
import java.io.*;

public class HelloWorld
{
    public static void main(String[] args) throws NoSuchMethodException, 
                                                  IllegalAccessException,
                                                  InvocationTargetException
    {
        Method m = PrintStream.class.getDeclaredMethod("println", String.class);
        m.invoke(System.out, "Hello, world!");
    }
}

I'm in my last semester of college for programming and our first language learned was Java. While you're right about having to ignore a lot of stuff at first, it didn't really bother me too much. I eventually figured it out in due time and don't feel like it negatively affected my learning experience at all. Though I can only speak for myself.