RPC/literal
RPC/encoded
Document/encoded
Document/literal
Document/literal wrapped
第1题:
指出下列哪个方法与方法public void add(int a){}为错误的重载方法()
A、public int add(int a)
B、public void add(long a)
C、public int add(long a)
D、public void add(float a)
第2题:
下列哪些是方法public int add (int a)的重载方法?()
第3题:
The following methods are to be published as Web services to be invoked via SOAP messages and validated with a schema: public void myMethod(int x, float y); public void myMethod(int x); public void someOtherMethod(int x, float y); Which WSDL style should be used?()
第4题:
现有: public class TestDemo{ private int X-2; static int y=3; public void method(){ final int i=100; int j =10; class Cinner { public void mymethod(){ //Here } } } } 在Here处可以访问的变量是哪些?()
第5题:
public class TestDemo{ private int x = 2; static int y = 3; public void method(){ final int i=100; int j = 10; class Cinner{ public void mymethod(){ //Here } } } } 在Here处可以访问的变量是哪些?()
第6题:
public class ConstOver { public ConstOver (int x, int y, int z) { } } Which two overload the ConstOver constructor?()
第7题:
public class MethodOver { private int x, y; private float z; public void setVar(int a, int b, float c){ x = a; y = b; z = c; } } Which two overload the setVar method?()
第8题:
public abstract class Shape { private int x; private int y; public abstract void draw(); public void setAnchor(int x, int y) { this.x = x; this.y = y; } } Which two classes use the Shape class correctly?()
第9题:
protected void change(int x){}
public void change(int x, int y){}
public void change(String s){}
public void change(int x){}
第10题:
protected void change (int x){}
public void change(int x, int y){}
public void change (int x){}
public void change (String s){}
第11题:
public class Circle implements Shape { private int radius; }
public abstract class Circle extends Shape { private int radius; }
public class Circle extends Shape { private int radius; public void draw(); }
public abstract class Circle implements Shape { private int radius; public void draw(); }
public class Circle extends Shape { private int radius;public void draw() {/* code here */} }
public abstract class Circle implements Shape { private int radius;public void draw() { / code here */ } }
第12题:
RPC/literal
RPC/encoded
Document/encoded
Document/literal
Document/literal wrapped
第13题:
include<iostream.h>
class A
{
private:
int x,y;
public:
void f1(int i=0,int j=0){x=i;y=j;}
void print(){cout<<x<<" "<<y<<endl;}
void f1(int i=0){x=i,y=0;}
};
void main()
{
A a;
a.f1(5);
a.print();
}
第14题:
给定java代码如下所示,在A处新增下列()方法,是对cal方法的重载。public class Test { public void cal(int x, int y, int z) { } //A }
第15题:
Given: 1. public class Method Over { 2. public void set Var (int a, int b, float c) { 3. } 4. } Which two overload the set Var method()?
第16题:
public class Parent{ public void change(int x){} } public class Child extends Parent{ //覆盖父类change方法 } 下列哪个声明是正确的覆盖了父类的change方法?()
第17题:
class BaseClass{ private float x= 1.0f; protected void setVar (float f) {x = f;} } class SubClass extends BaseClass { private float x = 2.0f; //insert code here } Which two are valid examples of method overriding?()
第18题:
Given: 1. public class ConstOver { 2. public constOver(int x, int y, int z) { 3. } 4. } Which two overload the ConstOver Constructor?()
第19题:
public class MethodOver { public void setVar (int a, int b, float c) { } } Which two overload the setVar method?()
第20题:
Private void setVar (int a, float c, int b) { }
Protected void setVar (int a, int b, float c) { }
Public int setVar (int a, float c, int b) (return a;)
Public int setVar (int a, int b, float c) (return a;)
Protected float setVar (int a, int b, float c) (return c;)
第21题:
ConstOver ( ) { }
Protected int ConstOver ( ) { }
Private ConstOver (int z, int y, byte x) { }
Public Object ConstOver (int x, int y, int z) { }
Public void ConstOver (byte x, byte y, byte z) { }
第22题:
public int cal(int x,int y,float z){return 0;}
public int cal(int x,int y,int z){return 0;}
public void cal(int x,int z){}
public viod cal(int z,int y,int x){}
第23题:
void setVar (int a, int b, float c){ x = a; y = b; z = c; }
public void setVar(int a, float c, int b) { setVar(a, b, c); }
public void setVar(int a, float c, int b) { this(a, b, c); }
public void setVar(int a, float b){ x = a; z = b; }
public void setVar(int ax, int by, float cz) { x = ax; y = by; z = cz; }
第24题:
( 难度:中等)下面哪个函数是 public void example(){...} 的重载函数?
A.private void example( int m){...}
B.public int example(){...}
C.public void example2(){...}
D.public int example ( int m, float f){...}
E.public int example ( int m, float f, int cc){...}
答案:DE