Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Java
(view source)
Revision as of 06:08, 4 April 2015
497 bytes added
,
06:08, 4 April 2015
no edit summary
Line 535:
Line 535:
[https://github.com/rafahsolis/javaTutorial/blob/master/AbstractClassChild2.java AbstractClassChild2.java]<br />
[https://github.com/rafahsolis/javaTutorial/blob/master/AbstractClassChild2.java AbstractClassChild2.java]<br />
[https://github.com/rafahsolis/javaTutorial/blob/master/AbstractClassChild1.java AbstractClassChild1.java]<br />
[https://github.com/rafahsolis/javaTutorial/blob/master/AbstractClassChild1.java AbstractClassChild1.java]<br />
+
+
== .equals() Method ==
+
It's used to compare if two objects of the same class are equal. In order to be able to use it you must override this method by:<br />
+
Right click on the class > source > Generate hashCode() and Equals()...<br />
+
Select the fields you whant to compare.<br />
+
See code examples:<br />
+
[https://github.com/rafahsolis/javaTutorial/blob/master/EqualsMethod.java EqualsMethod.java]<br />
+
[https://github.com/rafahsolis/javaTutorial/blob/master/Persona.java Persona.java]<br />
+
== Eclipse shortcuts ==
== Eclipse shortcuts ==
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version