Hello Carl,
Perhaps I got what you wanted to say.
the variables of class Point are not accessible to fultu unless they are declared static. and that we cant make method calls outside code block.
Hope I am right .
(Sorry for the delayed post,I hope I am not late)
the following program works as anticipated ...
class Point{
static protected int x=1,y=2;
}
class fultu extends Point{
public static void main(String args[]){
System.out.println(x); ///A//////
System.out.println(y); ///B////
Point p=new Point();
System.out.println(p.x);
System.out.println(p.y);
}
}
thanks Carl
[This message has been edited by sunil choudhary (edited January 25, 2001).]