• 2021-04-14
    中国大学MOOC: 类Test1定义如下:publicclassTest1{publicfloataMethod(floata,floatb){}}将以下哪种方法插入行3是不合法的。( )
  • public float aMethod(float c,float d){ }

    内容

    • 0

      类Parent、Child定义如下,将以下哪种方法插入“#####”处是不合法的。() A: floataFun(floata,floatb){} B: publicintaFun(inta,intb)throwsException{} C: publicfloataFun(floatp,floatq){} D: publicintaFun(inta,intb)throwsIOException{}

    • 1

      智慧职教: 类Test1定义如下: public class Test1{ public float aMethod(float a,float b){          } //此处是第三行位置 } 将以下哪种方法插入第三行位置是不合法的(        )

    • 2

      (5-2)定义如下Exam类,以下哪个方法插入①处是不合法的。() class Exam { //插入一个方法 ① public int aMethod(int x, Person y) {//已经定义Person类 return 1; } }

    • 3

      类Test1、Test2定义如下: A: public  class  Test1 B: { public  float  aMethod(float a,float b) throws C: IOException {      } D: } E: public  class  Test2  extends  Test1{ F: G: } 将以下哪种方法插入行6是不合法的。 H: float  aMethod(float  a,float  b){ } I: public  int  aMethod(int a,int b)throws  Exception{ } J: public  float  aMethod(float  p,float q){ } K: 都不对

    • 4

      类test的定义如下,$x是类test的对象,则4个选项中,正确的是()。 A: $x、a=1; B: $x->a=1; C: $x、b=1; D: $x->b=1;