Hi Hemant ,
An abstract class can have both abstract and non-abstract methods .
And FIRST CONCRETE class must implement abstract methods . This rule
does not apply to non-abstract methods .
abstract class Top{
void walk(){}
abstract void flee();
}
class Main extends Top{
public static void main(
String... args){
your Code..............
}
void flee(){
System.ou.println("Trying to flee.")
}
}
Here abstract method flee() is implemented but not walk();
Sometimes a class is declared abstract only because we do not want to
instantiate that class . However that class does not has any abstract method . It is valid in
Java to declare a class as abstract without having
any abstract method .
[ June 17, 2008: Message edited by: Madhukar Ojha ]