Showing posts with label equals in java. Show all posts
Showing posts with label equals in java. Show all posts

Sunday, February 12, 2023

What is the difference between == and .equals() in Java?

 The == operator compares references to objects, while the .equals() method compares the contents of two objects. In most cases, you should use .equals() when comparing objects in Java.

Concurrent Hashmap in java

  A ConcurrentHashMap is a thread-safe implementation of the Map interface in Java. Unlike a HashMap , which is not thread-safe and can ca...