Posts by Leonardo Villela • 241 points
3 posts
-
3
votes1
answer307
viewsQ: Use of equals and inheritance
I have a parent class and in it I have a equals and I have other daughter classes of this father class and in them I want to overwrite the equals to compare particular attributes of these daughter…
-
5
votes3
answers369
viewsQ: Stringbuffer.equals and String.equals difference in Java
The behaviour of the method equals class StringBuffer Java is different from equals class String? If yes, how would I overwrite that?…
-
16
votes4
answers930
viewsQ: Behavior of different ways of comparison in Java
If for example I have the code below, I am comparing the reference of the objects in the case ex1 and ex2 and not the object itself, correct? Pessoa ex1 = new Pessoa(); Pessoa ex2 = new Pessoa();…