The software creating the equals() method is Eclipse, am I wrong? Will it still work with objects defined on lines i've not writ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

The software creating the equals() method is Eclipse, am I wrong? Will it still work with objects defined on lines i've not writ

I've only been learning code until today, so I don't know anything about IDEs. Can you you make this more clear to me? Does the code editor review and create the equals() method according to the code as is it is at the right moment you call for it. Will this so created equals() method still be useful to compare objects I have not declared yet? In other words, the creation of the equals() method involving the hashCode() method defined according to the current code will still function to compare objects I will be defining later on in the same source code file?

6th Feb 2017, 7:57 PM
Martín Lehoczky
Martín Lehoczky - avatar
1 Answer
+ 3
equals() is a method of the String class. it's built in but don't expect Ecliple to change a==b into a.equals(b)
6th Feb 2017, 8:26 PM
seamiki
seamiki - avatar