title: Best way to check if a large HashMap contains a key?
body: <p>as i first found out about hashmaps i was amazed by it and i started working with, i have been using .contains to check if a hashmap contains a given key before i access it, but now i wonder if there might be a better (more efficient and fast way) to determinate if it contains a key.</p>
  
  <p>im quite not sure how .contains works but simply using .get and checking if the returned value/object is not null sounds like a better/faster way (might be totally wrong about it but now i use large hashmaps and it might be good to use the best way). have been reading that .getOrDefault might be also a way, could someone help me choosing the right way? thanks!</p>