What is the underlying data structure of a hashtable?
The underlying data structure of Hashtable is an array. More specifically, it consists of an array and a hash function. Each element in the array is a linked list or a red-black tree (implemented in JDK 1.8 and later) that stores key-value pairs. The hash function maps keys to index positions in the array, allowing for fast storage and retrieval of key-value pairs.