
Why should we prefer using .equals() to == while comparing strings in Java?
There is often a confusion between == and .equals(). Let's clear that confusion in a very simple way!
I am sophomore, pursuing bachelors in Computer Science and Engineering who loves to learn new things and share with others. I share all my learnings through blogs and twitter threads.

There is often a confusion between == and .equals(). Let's clear that confusion in a very simple way!

To master anything, we need to first get a grip on the basics. Have you started your journey with java and/or have always wanted to understand the difference between JDK, JRE and JVM in simplified terms? Then, https://giphy.com/gifs/justin-squid-game...