Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()
第1题:
class super { public float getNum() {return 3.0f;} } public class Sub extends Super { } Which method, placed at line 6, will cause a compiler error?()
第2题:
在接口中以下哪条定义是正确的?()
第3题:
可以限制一个方法重载的声明语句有()。
第4题:
Which two declarations prevent the overriding of a method?()
第5题:
Which will declare the method that forces a subclass to implement it?()
第6题:
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?()
第7题:
Which will declare a method that forces a subclass to implement it?()
第8题:
Final void methoda(){}
Void final methoda(){}
Static void methoda(){}
Static final void methoda(){}
Final abstract void methoda(){}
第9题:
Public float getNum() {return 4.0f; }
Public void getNum (){}
Public void getNum (double d){}
Public double getNum (float d) {retrun 4.0f; }
第10题:
正常
编译错误
运行错误
以上都不对
第11题:
public double methoda ():
static void methoda(double d1) {}
public native double methoda ():
abstract public foid methoda ():
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题:
Which two are valid declarations within an interface definition?()
第14题:
哪二种声明防止方法覆盖?()
第15题:
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?()
第16题:
现有: interface Animal { void eat () ; } //insert code here public class HouseCat extends Feline { public void eat() { } } 和五个申明 abstract class Feline implements Animal { } abstract class Feline implements Animal { void eat () ; } abstract class Feline implements Animal { public void eat();} abstract class Feline implements Animal { public void eat() {} } abstract class Feline implements Animal { abstract public void eat();} 结果为:()
第17题:
1. public class OuterClass { 2. private double d1 = 1.0; 3. // insert code here 4. } Which two are valid if inserted at line 3?()
第18题:
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的时候,结果是哪项?()
第19题:
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?()
第20题:
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(); }
第21题:
Public double methoda();
Static void methoda (double d1) {}
Public native double methoda();
Abstract public void methoda();
Protected void methoda (double d1){}
第22题:
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(); }
第23题:
abstract public void methoda ();
public abstract double inethoda ();
static void methoda (double dl) {}
public native double methoda () {}
protected void methoda (double dl) {}