FUNDAMENTALS OF COMPUTER

DATABASE FUNDAMENTALS

BASICS OF BIG DATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A HashMap allows the existence of:
A
Null values
B
one null key
C
None of these
D
All of these
Explanation: 

Detailed explanation-1: -A HashMap allows the existence of null keys and values, while a Hashtable doesn’t allow neither null keys, nor null values.

Detailed explanation-2: -Duplicates : ArrayList allows duplicate values while HashSet doesn’t allow duplicates values.

Detailed explanation-3: -An Iterator is an object that enables you to traverse through a collection and to remove elements from the collection selectively, if desired. You get an Iterator for a collection by calling its iterator method. The following is the Iterator interface.

Detailed explanation-4: -No Duplicate Key on HashMap You cannot store duplicate keys in HashMap. However, if you try to store duplicate key with another value, it will replace the value.

Detailed explanation-5: -Q. Which of the following statement is not correct about HashMap class ? HashMap class extends AbstractMap and implements Map interface. HashMap class is not synchronized.

There is 1 question to complete.