64. Compare to HashMap and ConcurrentHashMap?

Compare to HashMap and ConcurrentHashMap?

  • HashMap use asynchronous mechanism and it’s not thread safe
  • ConcurrentHashMap use synchonous mechansm and it’s safe for multiple thread
  • HashMap allow store one null key and many null values, but the ConcurrentHashMap don’t support store null key or null value

Leave a Reply

Your email address will not be published. Required fields are marked *