What is the difference between "==" and .equals in Java?
Anonymous
Main difference between == andequals in Java is that "==" is used to compare primitives while equals() method is recommended to check equality of objects. String comparison is a common scenario of using both ==and equals method.
Check out your Company Bowl for anonymous work chats.