Final void methoda(){}
Void final methoda(){}
Static void methoda(){}
Static final void methoda(){}
Final abstract void methoda(){}
第1题:
可以限制一个方法重载的声明语句有()。
第2题:
Which two declarations prevent the overriding of a method?()
第3题:
public class test ( private static int j = 0; private static boolean methodB(int k) ( j += k; return true; ) public static void methodA(int i)( boolean b: b = i < 10 | methodB (4); b = i < 10 || methodB (8); ) public static void main (String args[])( methodA (0); system.out.printIn(j); ) ) What is the result?()
第4题:
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?()
第5题:
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的时候,结果是哪项?()
第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题:
void methoda();
public double methoda();
public final double methoda();
static void methoda(double d1);
protected void methoda(double d1);
第9题:
正常
编译错误
运行错误
以上都不对
第10题:
final void methoda() {}
void final methoda() {}
static void methoda() {}
static final void methoda() {}
final abstract void methoda() {}
第11题:
void methoda();
public double methoda();
public final double methoda();
static void methoda(double d1);
protected void methoda(double d1);
第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题:
Which will declare the method that forces a subclass to implement it?()
第15题:
1. public class OuterClass { 2. private double d1 = 1.0; 3. // insert code here 4. } Which two are valid if inserted at line 3?()
第16题:
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?()
第17题:
Which will declare a method that forces a subclass to implement it?()
第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题:
The code will not compile.
The output is caught exception.
The output is caught IOException.
The program executes normally without printing a message.
第20题:
Public double methoda();
Static void methoda (double d1) {}
Public native double methoda();
Abstract public void methoda();
Protected void methoda (double d1){}
第21题:
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(); }
第22题:
public double methoda ():
static void methoda(double d1) {}
public native double methoda ():
abstract public foid methoda ():
protected void methoda (double d1) {}
第23题:
abstract public void methoda ();
public abstract double inethoda ();
static void methoda (double dl) {}
public native double methoda () {}
protected void methoda (double dl) {}
第24题:
i2 == startingI returns true.
i2 == startingI returns false.
i2.equals(startingI) returns true.
i2.equals(startingI) returns false.