对于下列代码:
class DataServer extends Server {
public String serverName;
public DataServer() {
serverName = "Customer Service";
super(serverName);
}
}
以下哪句描述是对的?
class DataServer extends Server {
public String serverName;
public DataServer() {
serverName = "Customer Service";
super(serverName);
}
}
以下哪句描述是对的?
举一反三
- 对于下列代码:class DataServer extends Server ...ame);}}以下哪句描述是对的?
- 给定Java代码如下,关于super的用法,以下描述正确的是() 。 class C extends B { public C() { super() ; } }
- 下列哪些是合法的类定义语句 A: public class A {} B: class A extends Exception,I0Exception {} C: public class 1A extends Object D: public class String {}
- 给定代码如下: public abstract interface Frobnicate { public void twiddle(String s); } 以下哪个类是正确的?(). A: public abstract class Frob implements Frobnicate { public abstract void twiddle(String s) { } } B: public abstract class Frob implements Frobnicate { } C: public class Frob extends Frobnicate { public void twiddle(Integer i) { } } D: public class Frob implements Frobnicate { public void twiddle(Integer i) { } }
- 以下代码调试结果 class Base {} class Sub extends Base {} public class CEx{ public static void main(String argv[]){ Base b = new Base(); Sub s = (Sub) b; } }