answersLogoWhite

0

Why comparator has equals method?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

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

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why comparator has equals method?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is equals a comparator of maths?

"Equal to" is a comparator. "Not equal to" is also a comparator.The following comparators are also used to compare scalar quantities:less thanless than or equal togreater thangreater than or equal to


How do you spell comparitor?

The correct spelling is "comparator."


What is advantage and disadvantage of optical comparator?

optical comparator advanteges


What is mean by comparatorexplain with diagrame?

com[arator is apricision instrument it is used to compare the actual size of workpeice there r 4 types of comparator 1: mechanical comparator 2:electrical comparator 3:optical comparator 4:penumatic comparator


What is sigma comparator?

it is a mechanical comparator with magnification in range of 300 to 5000


Similarity between opamp and comparator?

A comparator is simply an opamp with a certain configuation of external circuitry ( a few components) that make it function as a comparator.


Design 2-bit comparator using gates?

2 bit comparator = 1bit magnitude comparator +1 bit magnitude comparator if A>B =A(~B)(B bar); if A<B = ~A.B; A==B = AB + (~A)(~B); block of instruction shown above is for 1 bit comparator means if A>B ==true then High bit is set on (A>B) output. if A<B true then high bit is set on (A==B) output, If we cascade two 1 bit comparator then we can design 2-bit comparator...


Difference between a schmitt trigger and an ordinary comparator?

A Schmitt trigger is very similar to a comparator -- both have analog input and send out either a "high" or "low" digital output. A comparator senses the difference between its "+" and "-" inputs. If the "+" input is even a little bit higher than the "-", the comparator sends out a "high". If the "-" input is even a little bit higher than the "+", the comparator sends out a "low". A comparator has only one threshold value. A Schmitt trigger can be built from a comparator and some resistors. Typically the circuit involves positive feedback -- attaching a resistor to feed a small amount of the comparator's output back to the "+" input. A Schmitt trigger has 2 threshold values.


What is diff between comparator and comparable inerface in java?

Comparable is used to sort object based on natural ordering e..g Alphabetical for Strings while Comparator is used to sort object based on any order. Both of these interface is used to compare object and passed to Collections.sort() method for sorting a collection.


Why must you override the hashcode method while overriding the equals method?

Because, if two objects are supposed to be equal as per the equals() method, then the value returned by the hashCode() method must also be the same. This will not be the case if you override only the equals method and this can have some confusing effects when using those objects with hash related collections. So it is always a good idea to override the hashCode() method if you are providing an implementation for the equals method.


What is a schmitt trigger?

A COMPARATOR CIRCUIT WHICH CONVERTS ANY ARBITRARY SIGNAL(SLOPE!=1) TO SQUARE WAVEFORM IN SHORT A AMPLITUDE COMPARATOR


What are the application of the comparator?

A comparator is used to compare two things and state whether they are equal, or one is greater than or less than the other.