• 2022-06-30
    下面选项中哪一行代码可以替换题目中注释语句//add code here不会产生编译错误?()请解释原因?publicabstractclassMyClass {publicintconstInt = 5;//add code herepublicvoidmethod() {}}
    A: public abstract void method(int a);
    B: constInt = constInt + 5;
    C: public int method();
    D: public abstract void anotherMethod() {}
  • A

    内容

    • 0

      ​下面哪条语句把方法声明为抽象的公共方法?​ A: public abstract method(); B: public abstract void method(); C: public abstract void method(){} D: public void method() extends abstract;

    • 1

      49 下面哪条语句把方法声明为抽象的公共方法?() A: public abstract method(); B: public abstract void method(); C: public abstract void method(){} D: public void method() extends abstract;

    • 2

      【单选题】下面哪条语句把方法声明为抽象的公共方法? ( ) A: public abstract method(); B: public abstract void method(); C: public abstract void method(){} D: public void method() extends abstract;

    • 3

      把方法声明为抽象的公共方法是()? A: public abstract method(); B: public abstract void method(); C: public abstract void method(){} D: public void method()extends abstract

    • 4

      下面那几个函数是public void method(){̷}的重载函数? A: public void method( int m){} B: public int method(){} C: public void method2(){} D: public int method(int m,float f ){}