为AB类的一个无形参无返回值的方法method书写方法头,使得使用类名AB作为前缀就可以调用它,该方法头的形式为()。
A:staticvoidmethod()
B:publicvoidmethod()
C:finalvoidmethod()
D:abstractvoidmethod()
出自:计算机科学