Abstract public void methoda();
Public abstract double methoda();
Static void methoda(double d1){}
Public native double methoda(){}
Protected void methoda(double d1){}
第1题:
可以限制一个方法重载的声明语句有()。
第2题:
Which two declarations prevent the overriding of a method?()
第3题:
1. public class OuterClass { 2. private double d1 = 1.0; 3. // insert code here 4. } Which two are valid if inserted at line 3?()
第4题:
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的时候,结果是哪项?()
第5题:
Which will declare a method that forces a subclass to implement it?()
第6题:
Final void methoda(){}
Void final methoda(){}
Static void methoda(){}
Static final void methoda(){}
Final abstract void methoda(){}
第7题:
final void methoda(){}
void final methoda(){}
static final void methoda(){}
static void methoda(){}
final abstract void methoda(){}
第8题:
Public double methoda();
Static void methoda (double d1) {}
Public native double methoda();
Abstract public void methoda();
Protected void methoda (double d1){}
第9题:
static class InnerOne { public double methoda() { return d1; } }
static class InnerOne { static double methoda() { return d1; } }
private class InnerOne { public double methoda() { return d1; } }
protected class InnerOne { static double methoda() { return d1; } }
public abstract class InnerOne { public abstract double methoda(); }
第10题:
public double methoda ():
static void methoda(double d1) {}
public native double methoda ():
abstract public foid methoda ():
protected void methoda (double d1) {}
第11题:
abstract public void methoda ();
public abstract double inethoda ();
static void methoda (double dl) {}
public native double methoda () {}
protected void methoda (double dl) {}
第12题:
Int
Byte
Long
Short
Float
Double
第13题:
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?()
第14题:
Which will declare the method that forces a subclass to implement it?()
第15题:
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?()
第16题:
public class returnIt ( returnType methodA(byte x, double y) ( return (short) x/y * 2; ) ) What is the valid returnType for methodA in line 2?()
第17题:
Which three statements are true?()
第18题:
static class InnerOne { public double methoda() {return d1;} }
static class InnerOne { static double methoda() {return d1;} }
private class InnerOne { public double methoda() {return d1;} }
protected class InnerOne { static double methoda() {return d1;} }
public abstract class InnerOne { public abstract double methoda(); }
第19题:
void methoda();
public double methoda();
public final double methoda();
static void methoda(double d1);
protected void methoda(double d1);
第20题:
正常
编译错误
运行错误
以上都不对
第21题:
final void methoda() {}
void final methoda() {}
static void methoda() {}
static final void methoda() {}
final abstract void methoda() {}
第22题:
void methoda();
public double methoda();
public final double methoda();
static void methoda(double d1);
protected void methoda(double d1);
第23题:
A final method in class X can be abstract if and only if X is abstract.
A protected method in class X can be overridden by any subclass of X.
A private static method can be called only within other static methods in class X.
A non-static public final method in class X can be overridden in any subclass of X.
A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
A method with the same signature as a private final method in class X can be implemented in a subclass of X.
A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.
第24题:
Abstract public void methoda();
Public abstract double methoda();
Static void methoda(double d1){}
Public native double methoda(){}
Protected void methoda(double d1){}