如果子类中的方法mymehtod( )覆盖了父类中的方法mymethod( ),假设父类方法头部定义如下,void mymethod(int a),则子类方法定义不合法的是( )
A. public void mymethod( int a)
B. private void mymethod( int a)
C. protected void mymethod( int a)
D. void mymethod( int a)
类Parent、Child定义如下:1.public class Parent{2. public float aFun(float a, float b) throws IOException { }3.}4.public class Child extends Parent{5.6.}将以下方法插入行5, 不合法的是()
A. float aFun(float a, float b){ }
B. public int aFun(int a, int b)throws Exception{ }
C. public float aFun(float p, float q){ }
D. public int aFun(int a, int b)throws IOException{ }