在下列方法的定义中,正确的是 ( )A.public double x(){..;return false;}B.public static int x(double y){...}C.void x(doubled){...;return d}D.public static x(double a){..}

题目

在下列方法的定义中,正确的是 ( )

A.public double x(){..;return false;}

B.public static int x(double y){...}

C.void x(doubled){...;return d}

D.public static x(double a){..}


相似考题
参考答案和解析
正确答案:D
更多“在下列方法的定义中,正确的是()A.public double x(){..;return false;}B.public static int x(do ”相关问题
  • 第1题:

    有以下方法的定义,请选择该方法的返回类型()。 ReturnType method(byte x, double y) { return (short)x/y*2; }

    A.byte

    B.short

    C.int

    D.double


    D

  • 第2题:

    下列定义向量对象的语句中,错误的是()。

    A.vector <int> x;

    B.vector <double> x;

    C.vector <string> x;

    D.vector x;


    D

  • 第3题:

    有以下方法的定义,请选择该方法的返回类型()。 ReturnType method(byte x, double y) { return (short)x/y*2; }

    A.byte

    B.short

    C.int

    D.double


    C

  • 第4题:

    有以下方法的定义,该方法的返回类型ReturnType应为()。 ReturnType cal(byte x, double y){ return (short)x/y*2; }

    A.byte

    B.short

    C.int

    D.double


    short

  • 第5题:

    43、下列定义向量对象的语句中,错误的是()。

    A.vector <int> x;

    B.vector <double> x;

    C.vector <string> x;

    D.vector x;


    vector x;

  • 第6题:

    有以下方法的定义,请选择该方法的返回类型() ReturnType method(byte x, double y) { return (short) x/y*2; }

    A.byte

    B.short

    C.int

    D.double


    D