Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Problem with java program

Name: Anonymous 2009-03-28 20:51

public class Test {

    /**
     * @param args
     */
    String szHello="hello world!";
    public static void main(String[] args) {
        System.out.println(szHello);

    }

}

I get an error when I try to compile: Cannot make a static reference to the non-static field szHello  Test.java  test/src  line.
What does this mean?

Name: Anonymous 2009-03-28 21:24

Some people, when confronted with Java, think “I know, I'll use Hungarian notation.” Now they have two problems.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List