网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
public class returnIt ( returnType methodA(byte x, double y) ( return (short) x/y * 2; ) ) What is the valid returnType for methodA in line 2?()
A
Int
B
Byte
C
Long
D
Short
E
Float
F
Double
参考答案
参考解析
解析:
暂无解析
更多 “单选题public class returnIt ( returnType methodA(byte x, double y) ( return (short) x/y * 2; ) ) What is the valid returnType for methodA in line 2?()A IntB ByteC LongD ShortE FloatF Double” 相关考题
考题
下列程序的执行结果为【 】。include class Point{public:Point(double i, double j)
下列程序的执行结果为【 】。include <iostream. h>class Point{public:Point(double i, double j) { x=i; y=j;}double Area() const { return 0.0;}private:double x, y;};class Rectangle: public Point{public:Rectangle(double i, double j, double k, double 1)double Area() const {return w * h;}private:double w, h;};Rectangle: :Rectangle(double i, double j, double k. double 1): Point(i,j).{w=k, h=1}void fun(Point s){cout<<s. Area()<<end1;}void main( ){Rectangle rec(3.0, 5.2, 15.0. 25.0);fun(rec)}
考题
有如下两个类定义: class XX{ private: double xl; protected: double x2; public: double x3; }; class YY:protected XX{ private: double yl; protected: double y2; public: double y3; 在类YY中保护成员变量的个数是( )。A.1B.2C.3D.4
考题
1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (long)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?() A、 intB、 byteC、 longD、 shortE、 floatF、 double
考题
Which will declare a method that is available to all members of the same package and can be referenced without an instance of the class?() A、 Abstract public void methoda();B、 Public abstract double methoda();C、 Static void methoda(double d1){}D、 Public native double methoda(){}E、 Protected void methoda(double d1){}
考题
Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()A、 abstract public void methoda ();B、 public abstract double inethoda ();C、 static void methoda (double dl) {}D、 public native double methoda () {}E、 protected void methoda (double dl) {}
考题
public class TestA{ public void methodA() throws IOException{ //…… } } public class TestB extends TestA{ public void methodA() throws EOFException{ //…… } } public class TestC extends TestA{ public void methodA() throws Exception{ //…… } } 当编译类TestC的时候,结果是哪项?() A、 正常B、 编译错误C、 运行错误D、 以上都不对
考题
Which two are valid declarations within an interface definition?() A、 void methoda();B、 public double methoda();C、 public final double methoda();D、 static void methoda(double d1);E、 protected void methoda(double d1);
考题
Which will declare a method that forces a subclass to implement it? () A、 Public double methoda();B、 Static void methoda (double d1) {}C、 Public native double methoda();D、 Abstract public void methoda();E、 Protected void methoda (double d1){}
考题
在接口中以下哪条定义是正确的?()A、void methoda();B、public double methoda();C、public final double methoda();D、static void methoda(double d1);E、protected void methoda(double d1);
考题
有以下方法的定义,请选择该方法的返回类型()。 ReturnType method(byte x, double y){ return (short)x/y*2;}A、byteB、shortC、intD、double
考题
public class OuterClass { private double d1 1.0; //insert code here } You need to insert an inner class declaration at line2. Which two inner class declarations are valid?() A、 static class InnerOne { public double methoda() {return d1;} }B、 static class InnerOne { static double methoda() {return d1;} }C、 private class InnerOne { public double methoda() {return d1;} }D、 protected class InnerOne { static double methoda() {return d1;} }E、 public abstract class InnerOne { public abstract double methoda(); }
考题
1. public class returnIt ( 2. returnType methodA(byte x, double y) ( 3. return (short) x/y * 2; 4. ) 5. ) What is the valid returnType for methodA in line 2?() A、 IntB、 ByteC、 LongD、 ShortE、 FloatF、 Double
考题
public class ConstOver { public ConstOver (int x, int y, int z) { } } Which two overload the ConstOver constructor?() A、 ConstOver ( ) { }B、 Protected int ConstOver ( ) { }C、 Private ConstOver (int z, int y, byte x) { }D、 Public Object ConstOver (int x, int y, int z) { }E、 Public void ConstOver (byte x, byte y, byte z) { }
考题
Given: 1. public class ConstOver { 2. public constOver(int x, int y, int z) { 3. } 4. } Which two overload the ConstOver Constructor?()A、 ConstOver() {}B、 protected int ConstOver(){}C、 private ConstOver(int z, int y, byte x ) {}D、 public Object ConstOver(Int x, int y, int z) {}E、 pubic void ConstOver (byte x, byte y, byte z) {}
考题
1. public class OuterClass { 2. private double d1 = 1.0; 3. // insert code here 4. } Which two are valid if inserted at line 3?() A、 static class InnerOne { public double methoda() { return d1; } }B、 static class InnerOne { static double methoda() { return d1; } }C、 private class InnerOne { public double methoda() { return d1; } }D、 protected class InnerOne { static double methoda() { return d1; } }E、 public abstract class InnerOne { public abstract double methoda(); }
考题
public class returnIt ( returnType methodA(byte x, double y) ( return (short) x/y * 2; ) ) What is the valid returnType for methodA in line 2?()A、 IntB、 ByteC、 LongD、 ShortE、 FloatF、 Double
考题
单选题1. public class returnIt ( 2. returnType methodA(byte x, double y) ( 3. return (short) x/y * 2; 4. ) 5. ) What is the valid returnType for methodA in line 2?()A
IntB
ByteC
LongD
ShortE
FloatF
Double
考题
单选题有以下方法的定义,请选择该方法的返回类型()。 ReturnType method(byte x, double y){ return (short)x/y*2;}A
byteB
shortC
intD
double
考题
多选题public class ConstOver { public ConstOver (int x, int y, int z) { } } Which two overload the ConstOver constructor?()AConstOver ( ) { }BProtected int ConstOver ( ) { }CPrivate ConstOver (int z, int y, byte x) { }DPublic Object ConstOver (int x, int y, int z) { }EPublic void ConstOver (byte x, byte y, byte z) { }
考题
单选题Which will declare a method that forces a subclass to implement it? ()A
Public double methoda();B
Static void methoda (double d1) {}C
Public native double methoda();D
Abstract public void methoda();E
Protected void methoda (double d1){}
考题
单选题Which will declare a method that is available to all members of the same package and can be referenced without an instance of the class?()A
Abstract public void methoda();B
Public abstract double methoda();C
Static void methoda(double d1){}D
Public native double methoda() {}E
Protected void methoda(double d1) {}
考题
单选题public class TestA{ public void methodA() throws IOException{ //…… } } public class TestB extends TestA{ public void methodA() throws EOFException{ //…… } } public class TestC extends TestA{ public void methodA() throws Exception{ //…… } } 当编译类TestC的时候,结果是哪项?()A
正常B
编译错误C
运行错误D
以上都不对
考题
单选题Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()A
abstract public void methoda ();B
public abstract double inethoda ();C
static void methoda (double dl) {}D
public native double methoda () {}E
protected void methoda (double dl) {}
考题
多选题1. public class OuterClass { 2. private double d1 = 1.0; 3. // insert code here 4. } Which two are valid if inserted at line 3?()Astatic class InnerOne { public double methoda() { return d1; } }Bstatic class InnerOne { static double methoda() { return d1; } }Cprivate class InnerOne { public double methoda() { return d1; } }Dprotected class InnerOne { static double methoda() { return d1; } }Epublic abstract class InnerOne { public abstract double methoda(); }
考题
多选题public class OuterClass { private double d1 1.0; //insert code here } You need to insert an inner class declaration at line2. Which two inner class declarations are valid?()Astatic class InnerOne { public double methoda() {return d1;} }Bstatic class InnerOne { static double methoda() {return d1;} }Cprivate class InnerOne { public double methoda() {return d1;} }Dprotected class InnerOne { static double methoda() {return d1;} }Epublic abstract class InnerOne { public abstract double methoda(); }
考题
单选题1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (long)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?()A
intB
byteC
longD
shortE
floatF
double
热门标签
最新试卷