Sail E0 Webinar

MCQs

Total Questions : 10
Question 1. Which Map is synchronized?
  1.    Hashtable
  2.    ConcurrentSkipListMap
  3.    ConcurrentHashMap
  4.    All of these
 Discuss Question
Answer: Option D. -> All of these




Question 2. Which of these is not an interface in the Collections Framework?
  1.    Collection
  2.    Group
  3.    Set
  4.    List
 Discuss Question
Answer: Option B. -> Group




Question 3. The accuracy and efficiency of a HashMap can be guaranteed with
  1.    override equals method
  2.    Override hashCode method
  3.    None of these
  4.    All of these
 Discuss Question
Answer: Option D. -> All of these




Question 4. Which is best suited to a multi-threaded environment?
  1.    WeakHashMap
  2.    Hashtable
  3.    HashMap
  4.    ConcurrentHashMap
 Discuss Question
Answer: Option D. -> ConcurrentHashMap




Question 5. concurrentSkipListMap allows
  1.    one null key
  2.    many null values
  3.    all
  4.    None
 Discuss Question
Answer: Option D. -> None




Question 6. Which allows the removal of elements from a collection?
  1.    Enumeration
  2.    Iterator
  3.    Both
  4.    None
 Discuss Question
Answer: Option B. -> Iterator




Question 7. Which of these class should be preferred to be used as a key in a HashMap?
  1.    String
  2.    Integer
  3.    Double
  4.    Any of these
 Discuss Question
Answer: Option D. -> Any of these




Question 8. Which provides better performance for the insertion and removal from the middle of the list?
  1.    Vector
  2.    ArrayList
  3.    LinkedList
  4.    All of these
 Discuss Question
Answer: Option C. -> LinkedList




Question 9. Iterator returned by ConcurrentHashMap on key, value and entry is?
  1.    Fail-fast
  2.    Fail-safe
  3.    None
  4.    All
 Discuss Question
Answer: Option D. -> All




Question 10. The Comparable interface contains which called?
  1.    toCompare
  2.    compare
  3.    compareTo
  4.    compareWith
 Discuss Question
Answer: Option C. -> compareTo




Latest Videos

Latest Test Papers