Which will declare a method that forces a subclass to implement it?()
第1题:
可以限制一个方法重载的声明语句有()。
第2题:
Which two declarations prevent the overriding of a method?()
第3题:
Which will declare the method that forces a subclass to implement it?()
第4题:
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?()
第5题:
1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (short)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?()
第6题:
Final void methoda(){}
Void final methoda(){}
Static void methoda(){}
Static final void methoda(){}
Final abstract void methoda(){}
第7题:
void methoda();
public double methoda();
public final double methoda();
static void methoda(double d1);
protected void methoda(double d1);
第8题:
正常
编译错误
运行错误
以上都不对
第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题:
Abstract public void methoda();
Public abstract double methoda();
Static void methoda(double d1){}
Public native double methoda(){}
Protected void methoda(double d1){}
第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题:
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?()
第15题:
import java.io.IOException; public class ExceptionTest( public static void main (Stringargs) try ( methodA(); ) catch (IOException e) ( system.out.printIn(“Caught IOException”); ) catch (Exception e) ( system.out.printIn(“Caught Exception”); ) ) public void methodA () { throw new IOException (); } What is the result?()
第16题:
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的时候,结果是哪项?()
第17题:
public class returnIt ( returnType methodA(byte x, double y) ( return (short) x/y * 2; ) ) What is the valid returnType for methodA in line 2?()
第18题:
final void methoda(){}
void final methoda(){}
static final void methoda(){}
static void methoda(){}
final abstract void methoda(){}
第19题:
Public double methoda();
Static void methoda (double d1) {}
Public native double methoda();
Abstract public void methoda();
Protected void methoda (double d1){}
第20题:
int
byte
long
short
float
double
第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题:
Int
Byte
Long
Short
Float
Double