可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Given the following in


Given the following interface definition, which definitions are valid?()   interface I {   void setValue(int val);   int getValue();   }    DEFINITION a:   (a) class a extends I {  int value;   void setValue(int val) { value = val;  }   int getValue() {  return value;  }   }   DEFINITION b:   (b) interface b extends I {   void increment();   }   DEFINITION c:   (c) abstract class c implements I {   int getValue() {  return 0;  }  abstract void increment();   }   DEFINITION d:   (d) interface d implements I {  void increment();  }   DEFINITION e:   (e) class e implements I {  int value;   public void setValue(int val) { value = val; }  }  

  • ADefinition a.
  • BDefinition b.
  • CDefinition c.
  • DDefinition d.
  • EDefinition e.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、Given the following sc

Given the following scripts, both found in /usr/local/bin, what would the output be when exec...

2、Given the following on

Given the following on a system that is not a name server, which will be the first&e...

3、Given the following co

Given the following code fragment:    public void create() {    Vector myVect;&en...

4、Given the following co

Given the following code:   public class Test { void printValue(int m){ do { System.out...

5、Given the following RM

Given the following RMAN commands,choose the option that reflects the order required to restore&ens...

6、Given the following di

Given the following directory structure:And the following command line invocation: javac –d class...