According the book: if super class is abstract, the subclass must be abstract or all methods must be abstract.
But I compiled following file. It's good, its subclass is not abstract, why it compiled with non-complain?
=====================================
abstract class Base{
abstract public void myfunc();
public void another(){
System.out.println("Another method");
}
}
public class Abs extends Base{
public static void main(
String argv[]){
Abs a = new Abs();
a.amethod();
}
public void myfunc(){
System.out.println("My func");
}
public void amethod(){
myfunc();
}
}
1) The code will compile and run, printing out the words "My Func"