answersLogoWhite

0


Best Answer

== (the double equal sign) is used to compare two values (resulting in true if they are equal, false otherwise).

= (a single equal sign) is used to assign a value to a variable.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is different between equals equals and equals method in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why comparator has equals method?

The Java superclass Object says that all Java objects have an equals method. Thus Comparator has an equals method.


How do you campaire Strings in java?

String class in Java has an 'equals' method that can be used to compare strings.


What are some ways in order to perform String comparison in Java?

String comparison in Java features four ways. These ways are String comparison using equals method, equalsIgnoreCase method, CompareTo method, and CompareToIgnoreCase method.


Can a main method in java be overloaded?

Yes. The main method is just like any other java method and can be overloaded. But - Only the method with public static void main(String[] args) signature will get invoked when the class is run.


Difference between equals equals and equal in java?

"==" in java is the binary operator which compares two values and gives a boolean result While "=" in java is a assignment operator which assigns a value to a variable.


What is overridnig method and overlording method in java?

There is no such thing as overlording in Java.


What is notify function in java?

The notify() method is used in Thread Communication between two threads along with the wait() method


What is the difference between method and function in java?

A function is a piece of code that can be reused by calling its name while a method is a function that is associated with a class. In Java, functions are usually referred to as static methods.


What is difference between java 2 and java 5?

They are different versions. Java 5 is newer than Java 2. Think of it like the difference between the Playstation 1 and the Playstation 3.


Does Every class has a toString method and an equals method inherited from the Object class?

Yes - in Java, every class has this method, which is inherited from the Object class. Often, the inherited method does nothing particularly useful, but you can override it with your own implementation.


What is the task of the main method in java platform?

It is the method that gets called when a Java application is started.


What does exclamation equals mean in java?

The exclamation equals in Java(x!=) is used to represent the logical NOT.