7. Which of the following statements are true?A) The abstract modifier may be applied to classes, methods and primitives
B) The abstract modifier may be applied to classes but not methods
C) A non abstract class that extends an abstract class must implement all the abstract methods of the
inherited class
D) The abstract modifier maybe applied to both classes and methods
8. Which of the following classes, will return elements in the order they were added (first in first out) when accessed via an iterator?
A) java.util.HashSet
B) Java,utii.Vector
C) java.util.LinkedHashSet
D) java.util.TreeSet

解决方案 »

  1.   

    7. 正确的是?A) 修饰符abstract可以用于修饰类,方法和基本类型变量
    B) 修饰符abstract可以用于修饰类,但是不能修饰方法
    C) 继承了一个抽象类的非抽象类,必须实现所有它所继承的抽象类的所有抽象方法
    D) 修饰符abstract可以用于修饰类和方法8.下面的哪些类,当通过迭代访问它们时,会按照元素被添加进去时的顺序返回(即先进先出).A) java.util.HashSet
    B) Java,utii.Vector
    C) java.util.LinkedHashSet
    D) java.util.TreeSet
      

  2.   

    Vector有两个add方法。顺序不能保证