下面那个方法声明是正确的——
A: abstract final String doItYourSelf(){}
B: public abstract doItYourself(){}
C: private static void doItYourself(){}
D: public abstract static void doItYourself(){}
A: abstract final String doItYourSelf(){}
B: public abstract doItYourself(){}
C: private static void doItYourself(){}
D: public abstract static void doItYourself(){}
举一反三
- 在方法声明时,不能使用的关键字是()。 A: static、final、public B: abstract、void、final C: class、void、final D: static、abstract、final
- 以下关于方法声明中正确的是() A: A.public final writeLog(String msg) B: B.public final abstract void writeLog(String msg) C: C.public static final void writeLog(String msg) D: D.public static abstract void writeLog(String msg)
- 接口中的属性都是()的 A: public static final B: public abstract C: static abstract D: private final
- 下列程序中注释的那个代码是错误的? abstract class Takecare{ protected void speakHello() {} public abstract static void cry(); static int f(){return 0;} abstract float g(); } A: protected void speakHello() {} B: public abstract static void cry(); C: static int f(){return 0;} D: abstract float g();
- 一个类的方法在声明时可以同时使用以下多个关键字( )。 A: void、public、extends B: private、long、static C: static、public、private D: final、abstract、void