I am learning java from last month. I am having a doubt regarding abstract classes. I am trying to add another method which in abstract class test, but complirer is throwing an error. Could you please tell what i had done wrong in this code ?
Error - cannot find symbol - method err()
class abstct
{
public static void main(String args[])
{
one obj = new error();
obj.show();
obj.test();
obj.err();
}
}
abstract class one
{
abstract void show();
abstract void test();
}
abstract class two extends one
{
public void show()
{
System.out.println("Understood");
}
abstract void test();
}
abstract class three extends two
{
public void test()
{
System.out.println("Understood");
}
abstract void err();
}
class error extends three
{
public void err()
{
System.out.println("Here I am getting error .. ??");
}
}