[单选题]

类Test定义如下,将下列哪个方法插入③行处是不合法的( )?

① public class Test{

② public float Method(float a,float B) { }

③ ______

④ }

A.public float Method(float a,float b,float C) { }

B.public float Method(float c,float d){ }

C.public int Method(int a,int B) { }private float Method(int a,int b,int C) { }

D.private float Method(int a,int b,int C) { }

参考答案与解析:

相关试题

类Test定义如下,将下列哪个方法插入③行处是不合法的? ① public cl

[单选题]类Test定义如下,将下列哪个方法插入③行处是不合法的? ① public class Test { ② public float Method(float a,float b) { } ③ ④ }A.public float Method(float a,float b,float c) { }B.public float Method(float c,float d){ }C.public int Method(int a,int b){ }D.private float Method(in

  • 查看答案
  • 类Test定义如下,将下列哪个方法插入③行处是不合法的?()①public cl

    [单选题]类Test定义如下,将下列哪个方法插入③行处是不合法的? ( ) ①public class Test { ②public float Method(float a,float b){} ③ ④}A.public float Method(float a,float b,float c){}B.public float Method(float c,float d){}C.public int Method(int a,int b){}D.private float Method(int a,i

  • 查看答案
  • 类Test定义如下,将下列______方法插入③行处是不合法的。()①publi

    [单选题]类Test定义如下,将下列______方法插入③行处是不合法的。 ( )①public class Test{②public float Method(float a,float b){}③④}A.public float Method(float a,float b,float c){}B.public float Method(float c,float d){}C.public int Method(int a,int b){}D.private float Method(int a,in

  • 查看答案
  • 类Test定义如下,将下列()方法插入③行处是不合法的。①publicclass

    [单选题]类Test定义如下,将下列()方法插入③行处是不合法的。①publicclassTest{②publicfloatMethod(floata,floatb){}③④}A.publicfloatMethod(floata,floatb,floatc){}B.pubicfloatMethod(floatc,floatd){}C.publicintMethod(inta,intb){}D.pivatefloatMethod(inta,intb,intc){}

  • 查看答案
  • 类Test定义如下,将下列()方法插入③行处是不合法的。①publicClass

    [单选题]类Test定义如下,将下列( )方法插入③行处是不合法的。 ①publicClass Test{ ②public float Method(floatA,float b){} ③ ④}A.public float Method(floatA,float b,floatC){}B.public float Method(noatC,float d) {}C.public int Method(intA,int b){}D.private float Method(intA,int b,intC){

  • 查看答案
  • 有如下类定义:class Test {public: Test(){a=0;C=

    [单选题]有如下类定义: class Test { public: Test(){a=0;C=0;t //① int f(int A) const{this->a=a;} //② static int g( ){return a;} //③ void h(int B) {Test::b=b;}; //④ private: int a; static int b; const int c; }; int Test::b=0: 在标注号码的行中,能被正确编译的是A.①B.②C.③D.④

  • 查看答案
  • 有如下类定义:class Test{public:Test(){a=0;c=0}

    [单选题]有如下类定义: class Test { public: Test(){a=0;c=0} //① int f(int a)const{this->a=a;} //② static int g(){return a;} //③ void h(int b){Test::b;}; //④ private: int a; static int b; const int C; }; int Test::b=0; 在标注号码的行中,能被正确编译的是( )。A.①B.②C.③D.④

  • 查看答案
  • 有如下类定义: class Test { public: Test(){a=0;

    [单选题]有如下类定义: class Test { public: Test(){a=0;c=0;} //① int f(int a)const {this->a=a;} //② static int g(){return a;} //③ void h(int b){Test::b=b;}; //④ private: int a; static int b; const int c; }; int Test::b=0; 在标注号码的行中,能被正确编译的是A.①B.②C.③D.④

  • 查看答案
  • 有如下类定义:class Test{public:Test(){ a = 0;

    [单选题]有如下类定义:class Test{public:Test(){ a = 0; c = 0;} // ①int f(int a)const{this->a = a;} // ②static int g(){return a;} // ③void h(intB. . {Test::b = b;}; // ④private:int a;static int b;const int c;};int Test::b = 0;在标注号码的行中,能被正确编译的是A. . ①B. . ②C. . ③D.

  • 查看答案
  • 类testl定义如下: public class test1 { public

    [单选题]类testl定义如下: public class test1 { public float amethod(float a,float b){ } }A.public foat amethod(float a,float b,foat c){ }B.public float amethod(float c,float d){ }C.public int amethod(int a,int b){ }D.private float amethod(int a,int b,int c){ }

  • 查看答案