Sail E0 Webinar

MCQs

Total Questions : 45 | Page 5 of 5 pages
Question 41. Which of these method is used to insert value and its key?
  1.    put()
  2.    set()
  3.    insertElement()
  4.    addElement()
 Discuss Question
Answer: Option A. -> put()


put()


Question 42. Which of these class object uses key to store value?
  1.    Dictionary
  2.    Map
  3.    Hashtable
  4.    All if the mentioned
 Discuss Question
Answer: Option D. -> All if the mentioned


Dictionary, Map & Hashtable all implement Map interface hence all of them uses keys to store value in the object.


Question 43. Which of these is the interface of legacy is implemented by Hashtable and Dictionary classes?
  1.    Map
  2.    Enumeration
  3.    HashMap
  4.    Hashtable
 Discuss Question
Answer: Option A. -> Map


Dictionary, Map & Hashtable all implement Map interface hence all of them uses keys to store value in the object.


Question 44. Which of these is a class which uses String as a key to store the value in object?
  1.    Array
  2.    ArrayList
  3.    Dictionary
  4.    Properties
 Discuss Question
Answer: Option D. -> Properties


Properties


Question 45. Which of these methods is used to retrieve the elements in properties object at specific location?
  1.    get()
  2.    Elementat()
  3.    ElementAt()
  4.    getProperty()
 Discuss Question
Answer: Option D. -> getProperty()


getProperty()


Latest Videos

Latest Test Papers