in Education by
Set has contains(Object o) method. (a) True (b) False The question was posed to me by my school principal while I was bunking the class. My question comes from Data Structures-Set in portion java.util – The Collections Framework of Java Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Correct choice is (a) True Easy explanation: Set has contains(Object o) method instead of get(Object o) method as get is needed for comparing object and getting corresponding value.

Related questions

0 votes
    Do we have get(Object o) method in HashSet. (a) True (b) False The question was posed to me by my ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these is a method of class Date which is used to search whether object contains a date before the ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these class object has an architecture similar to that of array? (a) Bitset (b) Map (c) ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods is called when observed object has changed? (a) setChanged() (b) update() (c) ... Utility Classes of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    Which of these method is used to add an element to the start of a LinkedList object? (a) add() (b ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these method of HashSet class is used to add elements to its object? (a) add() (b) Add() ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of this method is used to change an element in a LinkedList Object? (a) change() (b) set() ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these method is used to calculate number of bits required to hold the BitSet object? (a) size( ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these classes implements Set interface? (a) ArrayList (b) HashSet (c) LinkedList (d) DynamicList I ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods can be used to obtain set of all keys in a map? (a) getAll() (b) getKeys( ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    When two threads access the same ArrayList object what is the outcome of the program? (a) Both are able ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods can be used to delete the last element in a LinkedList object? (a) remove() (b ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these object stores association between keys and values? (a) Hash table (b) Map (c) Array (d ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these class object can be used to form a dynamic array? (a) ArrayList (b) Map (c) Vector ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these class object uses the key to store value? (a) Dictionary (b) Map (c) Hashtable (d) ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
...