public class IC1 {
private int x = 3;
static int y=4;
class Inner {
public void inmet() { System.out.println(x + " " + y);} }
public void do() {
Inner i = new Inner();
i.inmet(); }
public static void main(String r[]) {
IC1 ic = new IC1();
ic.do();
}
}
Seems like a pretty straight forward program where in my knowledge I have followed all rules of Inner Class. Checked all {} and ; also. What could be the reason for the errors?