Hi friends still I am not able to find the reason why we use abstract class .
for example:
public abstract class Test{
abstract void show();
}
class Demo extends Test{
public void show(){
System.out.println("hi");
}
public static void main(String a[]) {
Demo obj = new Demo();
show();
obj.show();
}
}
Instead of this I can directly use
class Demo {
void show(){
sop("hi");
}
public static void main(String a[]){
Demo obj = new Demo();
obj.show();
}
}
What is the use of abstract class here? How to use overriding concept without abstract class if it is possible?