Filter by Tags

Difference between == and .equal() methods in Java



0 0

What is the main difference between == and .equals() method in Java. In which situation should these methods be used.

Open E-School
Posted on : Fri, Jan 19, 2018
Views : 84

Ask Question

If you want to ask question you must LogIn or SignUp
Login SignUp

Answers (1)


In Java == operator is used for reference checking and .equal() method is used for value checking. This means that .equal() method will always give true if the value of two objects is the same and == will always give true if the objects being compared are the same.

For more details please go through this article 

Ravinder Singh
Fri, Jan 19, 2018

Edit Answer

This answer will permanently deleted. Do you really want to delete this Answer ?
To Add your Answer Please
LogIn | SignUp

Quick Links



Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..


Login to Open ESchool OR Create your account    Login   SignUp