No video

hashcode() in java || The IMPACT of hashcode and equals || java object class || Part 1

  Рет қаралды 70,832

Selenium Express

Selenium Express

5 жыл бұрын

hashcode() in java, overriding hashcode java, how hashcode is calculated in Java,object class in java, what is hashcode in java, hashcode and equals method in java
hashcode java,hashcode and equals in java,object equals method java,important topics in java,hashcode and equals contract in java,java object class methods
java important interview questions,java beginner tutorial,java collection tutorial for beginners
The 'hashcode and equals contract in java’ is one of the most favorite questions in the java interview room. This question is also very important to test candidates
collection fundamental as the hash-based collections like HashSet , hashtable, hashmap etc uses hashcode() and equals() to get its task done. So let’s understand
the hashcode() and equals() from object class(java.lang.object) step by step.
This is part 1 of the ‘hashcode and equals series’ and we will only be talking about hashcode in this video and in the next video we will move to the equals method in java.
This tutorial based on the focus on the following topics.
1 hashcode() description
2 Understanding native åmethod in java
3 Understanding the hashcode calculation
4 Overriding hashcode method of Object class
5 Creating custom hashcode method
6 Key points of hashcode()
For more videos, consider subscribing by clicking the link below.
/ @seleniumexpress
Stay tuned and like my Facebook page for more.
/ seleniumexpress
Music :
-----------
credits : -
(intro)
Adventures by A Himitsu / a-himitsu
Creative Commons - Attribution 3.0 Unported- CC BY 3.0
creativecommons.org/licenses/b...
Music released by Argofox • A Himitsu - Adventures...
Music provided by Audio Library • Adventures - A Himitsu...
intro template :
/ alexbau01

Пікірлер: 140
@lsamparkl
@lsamparkl 4 жыл бұрын
Of all my years of viewing KZfaq lectures/tutorials/explanations you are by far the most concise, and carefully articulate tutor! thank you
@SeleniumExpress
@SeleniumExpress 4 жыл бұрын
Thank you, Sam.😊
@pallavishahare790
@pallavishahare790 3 жыл бұрын
Very good explanation. Thanks Abhilash.
@NITISHKUMAR-nx9mk
@NITISHKUMAR-nx9mk Жыл бұрын
Very Nice Explanation!
@mohamedely3987
@mohamedely3987 Жыл бұрын
Well-done 🎉
@tirthjayswal9895
@tirthjayswal9895 2 жыл бұрын
Very good and deep explenation
@jatinlanje5741
@jatinlanje5741 Жыл бұрын
wow so well explained! Thank you.
@ravijatwa240
@ravijatwa240 3 жыл бұрын
Very good explanation
@bandaruneeraj7246
@bandaruneeraj7246 10 ай бұрын
Simply Great!!!!!!!
@yatendra__singh
@yatendra__singh 2 жыл бұрын
Pls create more videos like this ,you are the best on KZfaq for explaining any topic ,pls upload a interview series for experience in Java
@unagi4254
@unagi4254 3 жыл бұрын
this video helped me A LOT! thank you so much for this tutorial I really appreciate your energy
@prasantaroutray6053
@prasantaroutray6053 5 жыл бұрын
Excellent and superb always
@Balu-wx7dd
@Balu-wx7dd 3 жыл бұрын
Good explanation
@nebilgokdemir4527
@nebilgokdemir4527 4 жыл бұрын
I have been watching a couple of your videos. your knowledge is seriously so deep in coding and you explain truly so basic. I truly thankful for all great knowledge that you share with us and now I am following to watch all your video. stay bless.
@Pritamdas-bg7fp
@Pritamdas-bg7fp 4 жыл бұрын
truly such a great explanation ...like i am in primary school and the teacher is explaining me
@pushpanjalishivanna5533
@pushpanjalishivanna5533 5 жыл бұрын
Super:) More n more expectation from you:)
@alxx736
@alxx736 3 жыл бұрын
This channel it s in another level .We should pay one .You show how things work internally . Nobody do that. Millon thanks
@oumaimaabouzaid4948
@oumaimaabouzaid4948 Жыл бұрын
Thank you sooooo much... The explanation is very clear and thorough
@vladanulardzic5859
@vladanulardzic5859 4 жыл бұрын
Great work ! Great teaching ! You put a really great work in this lesson ! If possible make more basic practical examples with trusted libraries. Thank you.
@AbhishekGupta-bt8ib
@AbhishekGupta-bt8ib 3 жыл бұрын
Don't know why this guy has so less subscribers. Definitely he needs more subscribers
@mohanapriyasavithri425
@mohanapriyasavithri425 3 жыл бұрын
Well said
@RanjanSingh-qr1jo
@RanjanSingh-qr1jo 2 жыл бұрын
I love to watch your video and clear my basic fundamental in core java.
@TightyWhities94
@TightyWhities94 5 жыл бұрын
Hey, great lesson! Can you do Serialization sometime?
@mohammadikram687
@mohammadikram687 3 жыл бұрын
Man o Man ur teaching method is way too good.. Ma Sha Allah nazar na lag jaye kisi ki. Hope ur channel grow fast nd it will.. Keep up the good work sir.
@alvaroisea2259
@alvaroisea2259 2 жыл бұрын
Thanks for teaching java this way, the information you're providing is very helpful! thanks!
@parambharti7095
@parambharti7095 3 жыл бұрын
Great !!!!!!
@a2zs862
@a2zs862 5 жыл бұрын
Simply no words to say than saying Thank You, So Thank you so much Abhilash..Great job keep it up.
@stevancosovic4706
@stevancosovic4706 3 жыл бұрын
Thank you, you would be a great teacher or programming on IT faculty, very calm, focused and straight to the point. The step by step approach is really effective here. Best wishes.
@shivanideorukhakar
@shivanideorukhakar 4 жыл бұрын
super knowledge n best explanation.. thank you
@bloom6874
@bloom6874 2 жыл бұрын
great explanation. You explain the concept in depth and repeat the concepts again for better understanding just like I do while teaching. Great job. keep it up.
@sunilyadav-xt7op
@sunilyadav-xt7op 5 жыл бұрын
Nice way to make concept clear.... Thnx
@codewithSuraj7
@codewithSuraj7 2 ай бұрын
I just want to Say Thank You So much Bro
@arpanbanerjee8584
@arpanbanerjee8584 4 жыл бұрын
Eagerly waiting for your 3 rd video of the series. Pls complete that. I didn t find any tutorials which gave a satifactory explanation abt the contract bw hascode and equals they are just showing some examples and telling that it is necessary. Pls post a detailed video.
@rahimkhan-fh9dd
@rahimkhan-fh9dd 5 жыл бұрын
nicely explained pls quick upload part 2 of this video
@sukhrobibrokhimov2230
@sukhrobibrokhimov2230 3 жыл бұрын
Thank you bro it was so good tutorial for developers who has not got solid knowledge about hashcode. Respect
@mohdshazalibinhamid9374
@mohdshazalibinhamid9374 2 жыл бұрын
Together Moving Forward Team
@vasanth.s1658
@vasanth.s1658 4 жыл бұрын
Excellent bro!!!..cheerss
@MrPrabhuvin
@MrPrabhuvin 2 жыл бұрын
Awesome explain 👍
@vijayr6540
@vijayr6540 4 жыл бұрын
Excellent bhayya , good one Thanks a Lot
@zubayerahmedsakib3692
@zubayerahmedsakib3692 5 жыл бұрын
god bless you brother for this amazing explanataion
@cherryartsgallery3177
@cherryartsgallery3177 3 жыл бұрын
Very clearer explanation. Keep it up. God bless you
@habeebshaik6207
@habeebshaik6207 4 жыл бұрын
Excellent video thanks
@nileshmohale2743
@nileshmohale2743 Жыл бұрын
Very helpful session Thanks 🙏
@hanisntsolo
@hanisntsolo 3 жыл бұрын
Very well explained Thanks a lot.
@vinaymishra8533
@vinaymishra8533 2 жыл бұрын
Very good explanations
@JavaObjectException
@JavaObjectException 3 жыл бұрын
Bro, your explanation is very nice. Is it possible to share which books u are following to get this kind of knowledge?
@anshumansahoo5162
@anshumansahoo5162 5 жыл бұрын
✌✌
@koushikdas2755
@koushikdas2755 4 жыл бұрын
Very good explanation.
@gugudukullaiswamy1815
@gugudukullaiswamy1815 5 жыл бұрын
This is high level explanation ,,,, just no word's to say... This type of professionals required for achieving anything..... You are doing great work... Thank you so much abhilash.... We are expecting more concepts like this from you and help the people like us.... 🙏🙏🙏
@chonylau6981
@chonylau6981 3 жыл бұрын
Thank you for your crystal clear explanation.
@davidfabian8620
@davidfabian8620 3 жыл бұрын
I think : At 32:11 the hash code method returns same number because u created a string literal, a string object is created by using a new keyword.
@Dyslexic_Neuron
@Dyslexic_Neuron 5 жыл бұрын
Worth every minute ......good amount of hardwork ...thanks
@SeleniumExpress
@SeleniumExpress 5 жыл бұрын
Thank you..Glad that it helped 🙂
@thatpanditcoder
@thatpanditcoder 4 жыл бұрын
this is awesome bro....keep it up....your videos are quite good but you are underrated by youtube....keep up the good work...you are helping million minds like us...god bless you
@premkirankatinedi4479
@premkirankatinedi4479 5 жыл бұрын
WOW MAN! Simply superb...crystal clear
@soumitanandy5862
@soumitanandy5862 5 жыл бұрын
Hey, nice lesson..!thank you..
@soundaryadash7709
@soundaryadash7709 2 жыл бұрын
Very detailed and simple explanation, really loved your video :)
@mutramohanreddy5315
@mutramohanreddy5315 3 жыл бұрын
Thank you👍
@anilamane6764
@anilamane6764 5 жыл бұрын
i think your body is filled with java awesome great keep doing such videos love your teaching sir superb
@prashanthraju7081
@prashanthraju7081 4 жыл бұрын
nice explanation
@sathya8242
@sathya8242 5 ай бұрын
Thanks a ton Abhilash!!
@sushantsinha2976
@sushantsinha2976 4 жыл бұрын
Superb incredible explanation bro.You clear my all doubt
@abhinavghosh725
@abhinavghosh725 4 жыл бұрын
HOW DO YOU KNOW THE HASHCODE FUNC DOES NOT RETURN THE MEMORY ADDRESS OF THE OBJECT IN HEAP! IS THERE A WAY OF KNOWING THE MEMORY ADDRESS OF OBJECTS IN JAVA
@kumarrishav7078
@kumarrishav7078 4 жыл бұрын
nice way of explaining...
@Just_got_it123
@Just_got_it123 5 жыл бұрын
great editing work
@tindo0038
@tindo0038 4 жыл бұрын
thank you so much
@naveenvigneshwar5190
@naveenvigneshwar5190 11 ай бұрын
Thanks a ton :)
@tech_excellence
@tech_excellence 5 жыл бұрын
nice video!
@user-yg5iw7zk1x
@user-yg5iw7zk1x Ай бұрын
For selenium automation Engineer up to what level Java is required .
@abdullahbinmazi7137
@abdullahbinmazi7137 5 жыл бұрын
Bro pls make a set of video of spring aop module.. I saw your whole series of core module and that really attract me the goods of spring framework.. Pls do it for me and rest of the student
@willietebs8399
@willietebs8399 5 жыл бұрын
@Abhilash, How do I condition the hasCode to generate only 6 numbers per object created?
@ravitejainapanuri1804
@ravitejainapanuri1804 2 жыл бұрын
Object identity ensures by equals then why hasch code is required and what is the significance of it?
@rakeshkumar8908
@rakeshkumar8908 5 жыл бұрын
Clear explanation.thnx
@shemantsingh765
@shemantsingh765 2 жыл бұрын
Dear Selenium Express, why is the need to override Hashcode as anyway we are getting hashcode from the default object class ??
@hifromspace
@hifromspace 4 жыл бұрын
You teach really well
@superflyj416
@superflyj416 3 жыл бұрын
Good video. Thought he was talking about eunuchs for a second though.
@luisv8887
@luisv8887 2 жыл бұрын
wow, the first part was supposed to be boring? it was very interesting! great video
@jvsnyc
@jvsnyc 3 жыл бұрын
Good lecture. I was sloppy in one of my previous comments, but I realize we should write hashCode() consistently with the Capital C. Certainly in a tutorial, but really any place. We are used to the IDE fixing things for us, but it is better to remember it correctly.
@PankajKumar-qk8oh
@PankajKumar-qk8oh 3 жыл бұрын
Great explanation, really helpful. Please make some java real time projects videos
@soumyachatterjee745
@soumyachatterjee745 5 жыл бұрын
Very very good explanation.
@SeleniumExpress
@SeleniumExpress 5 жыл бұрын
Thanks, Soumya !
@mattsmith6828
@mattsmith6828 3 жыл бұрын
To make this less confusing, the Strings "FB" and "Ea" were meticulously and purposely chosen, as virtually any other combination of two letters in either String would be different than "2236". That confused me until I messed around with it myself.
@start1learn-n171
@start1learn-n171 Жыл бұрын
Tq
@DeepakKumar-nr1qj
@DeepakKumar-nr1qj 4 жыл бұрын
super
@SurendraGurjar2014
@SurendraGurjar2014 3 жыл бұрын
Good explanation but very lengthy , could be lot shorter.
@aastha4708
@aastha4708 3 жыл бұрын
this means equals method is used for content comparison??
@anupamanand1550
@anupamanand1550 10 ай бұрын
can't we override the hashcode() & equals() method so every time we will get a unique number each time?
@vigneshdeven3177
@vigneshdeven3177 4 жыл бұрын
I think all string literal point to same heap memory ,while string object points to do different object in heap memory, please let me know if it is otherwise.
@mcq2427
@mcq2427 5 жыл бұрын
nicely explained bro, plz upload spring-boot videos
@dilipnathrani8014
@dilipnathrani8014 5 жыл бұрын
Awesome explanations.... waiting for part 2.... happy coding
@nithiyaarulanantham4536
@nithiyaarulanantham4536 5 жыл бұрын
Hey Abilash please upload video on comparator and comparable interface please
@prathameshkale1329
@prathameshkale1329 5 жыл бұрын
yes plz do it
@sherlanaveenkumar1837
@sherlanaveenkumar1837 5 жыл бұрын
Hi, what's the reason for hashcode same for FB, Ea objs, pls share it, yesterday I faced
@pragun1993
@pragun1993 4 жыл бұрын
If the native Object class implementation of hashcode method utilizes address of the object (which is unique) in the calculation of hashcode, then how is it possible that two different objects (even though they have same contents inside them) can have same hash code? A custom implementation of hash code for Employee class which has integer id as an instance filed might utilize this id to calculate hashcode in which case, different employee objects(E1 and E2) with same id will return same hash code. But if you're relying on object's class hashcode method implementation, how will you get same hash code, when we know E1 and E2 point to two different objects.
@dipak002
@dipak002 3 жыл бұрын
But, as you said, the hashcode is uniquely calculated for an object. Then given the same hashcode, the corresponding objects must be equal, isn't it? Else the implementation of hashcode is incorrect. Can you explain? Do you suggest we must always implement our hashcode for an object where hashing is needed?
@gokuldighe9160
@gokuldighe9160 4 жыл бұрын
God bless you
@nagarajanerode
@nagarajanerode 3 жыл бұрын
So in this case, str.equals(str2) will be true, right.. for the values str=FB and str= Ea
@sairos4057
@sairos4057 Жыл бұрын
gigachad!
@saileshyalakaturi366
@saileshyalakaturi366 5 жыл бұрын
bro please upload spring mvc and spring boot example
@HenryLeu
@HenryLeu 3 жыл бұрын
What if 2 objects have the same contents, but their hash codes are different? Are the 2 objects equal or different?
@zamin9438
@zamin9438 5 жыл бұрын
I feel like this tutorial could be explained in 10 minutes max. Great Video, but not that concise.
@ganeshbejawada2250
@ganeshbejawada2250 5 жыл бұрын
When will i expect next video of this tutorial Abhilash
@BlueHawkPictures17
@BlueHawkPictures17 4 жыл бұрын
Such fantastic production quality, but goddammit why does the sound quality always have to be so bad in all these tutorials.
@sandeepkumarnayak4865
@sandeepkumarnayak4865 4 жыл бұрын
what are the befefites of hashcode().
@faizulislam5096
@faizulislam5096 5 жыл бұрын
Great explaination..Can you please make a video on executor framework.
Алексей Щербаков разнес ВДВшников
00:47
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 9 МЛН
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 41 МЛН
02. Equals and HashCode Contract & Different Variations
11:19
WebEncyclop Tutorials
Рет қаралды 55 М.
Microservices in 60 mins | Learning Path & Interview Preparation
59:40
Selenium Express
Рет қаралды 25 М.
Why Is CPI Crashing The Market Today?
5:38
Ricky Gutierrez
Рет қаралды 8 М.
Алексей Щербаков разнес ВДВшников
00:47