Answer: Get operation in HashMap is constant time function. Keys are unique in HashMap and index is generated based on key. Getting value from an array based on index is Constant time function.
Java is a trademark of Oracle.
Apekshit.com is just for learning and testing. To improve basic understanding we provide some examples. We are constantly reviewing it to avoid errors, but we cannot warrant full correctness of all content.