How can I tell if two Java instances represent the same instance? And what does class equality mean in Java?
The question here is, what does it mean to be the same or different in Java. If you modeled me, maybe two of me had blue shirts and the third had a red shirt. So their shirt color attribute would be the blue for two DJ instances, and red for a third DJ instance. Are they equal because they have the same color shirt, or are they the same me? We're going to clear that up in this lesson as we learn about what it means in Java for two instances to be equal.
#java #programming #tutorial
Like the video? Don't forget to subscribe! ➜ http://www.deegeu.com/subscribe
Keep up to date with the newsletter! ➜ http://www.deegeu.com/newsletter/
Concepts: Java, classes, equals, hashcode
Social Links: Don't hesitate to contact me if you have any further questions.
WEBSITE : firstname.lastname@example.org
TWITTER : http://www.twitter.com/deege
GOOGLE+ : http://google.com/+Deegeu-programming-tutorials
Hosted by DJ Spiess
About Me: http://www.deegeu.com/about-programming-tutorial-videos/
What are static factory methods in Java? - 036
Free Java Course Online
Media credits: All images are owned by DJ Spiess unless listed below:
Cold Funk - Funkorama by Kevin MacLeod is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/4.0/)