Hi all,
class Base
{
void methodA()
{
System.out.println("base - MethodA");
}
}
class TestBinding extends Base
{
public void methodA()
{
System.out.println("sub - MethodA");
}
public void methodB()
{
System.out.println("sub - MethodB");
}
public static void main(
String args[])
{
Base b=new TestBinding(); //1
b.methodA(); //2
b.methodB(); //3
}
}
There is a compile error at //3. (cannot resolve symbol) Can anybody explain what that mean? methodB is available as one of the members of TestBinding class. I am not sure why it will cause compile error.
Thanks