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

Difference between = and == operators in java Another difference between them is that, If both “==” and equals() is used to compare objects than ==returns true only if both references points to same object while equals() can return true or false based on its overridden implementation .

Sizin İçin Seçtik  Can you compare objects with ==?

Leave a Reply

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