• 2022-05-31
    现有如下代码[br][/br]class Super{ [br][/br] public float getNum(){return 3.0f;} [br][/br] } [br][/br]public class Sub extends Super{ [br][/br] //【代码】[br][/br]} [br][/br]在【代码】标注行加入下列哪行代码后会导致程序编译错误
    A: public float getNum(){return 4.0f;}
    B: public void getNum(){}
    C: public void getNum(double){}
    D: public double getNum(float d){return 4.0d;}
  • 举一反三