Loading

Q1.

Which of the following is true about Hashtable in Java?

A. It allows one null key and multiple null values

B. It allows one null key but no null values

C. It allows multiple null keys and one null value

D. It does not allow null keys or null values


Q2.

What is the default initial capacity of a Hashtable?

A. 8
B. 11
C. 16
D. 32

Q3.

Which feature differentiates Hashtable from HashMap?

A. Allows null values

B. Maintains insertion order

C. Is synchronized by default

D. Uses a Tree structure internally


Q4.

Which data structure is used internally by Hashtable?

A. Array of LinkedList

B. Array + Red-Black Tree

C. TreeMap

D. Binary Heap


Q5.

Which of the following statements is NOT true about Hashtable?

A. It is part of the legacy collection classes

B. It is synchronized and thread-safe

C. It allows null keys and one null value

D. It implements the Map interface