3.8.9.Static methods are not allowed to use the nonstatic features of their class.
public class MainClass { int i = 0;
public static void main(String[] argv) {
System.out.println(i);
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Cannot make a static reference to the non-static field i
at MainClass.main(MainClass.java:5)