While compiling the flowing code I get a cmpiler error 'identifier expected at i=7'.
class
test {int i, j;
i = 7;
j = 10;
public static void main(
String arg[])
{int i = 10;
int j = 7;
System.out.println(i+j);
test basis = new test();
System.out.println(basis.i);
}
}
Could anyone please explain this, when 'i' itself is an identifier.