Thanks,
and please help me with this static acess...
thats one thing I was confused with. I tried to compile this code that accesses the superclass static variable y in the subclass. But code does not compile it gives following error....
super(y) cannot find symbol, variable y
SubClassStatic.y cannot find symbol:variable y
Class CheckStatic{
static int y =2;
CheckStatic(int x) {x=x*2;};
}
public class SubClassStatic
{
SubClassStatic(){super(y);}
public static void main(
String[] args){
System.out.println(SubClassStatic.y);
}