• 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() {}

    下面选项中哪一行代码可以替换题目中注释语句//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() {}

  • 1