不需要,抽象类不一定非要有抽象方法。

示例代码:

1
2
3
4
5
abstract class Dog {
public static void sayHi() {
System. out. println("hi~");
}
}

上面代码,抽象类并没有抽象方法但完全可以正常运行。