Overriding the Object equals Method - Java Override Example - Comparing Objects - APPFICIAL

Overriding the Object equals Method - Java Override Example - Comparing Objects - APPFICIAL

Appficial

6 лет назад

46,444 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@Appficial
@Appficial - 20.09.2019 19:54

Please SUBSCRIBE! More programming videos coming soon! ✌️

Ответить
@alexcondon1116
@alexcondon1116 - 24.01.2020 20:12

Hi, I'm taking a java course at my University. This video has cleared things up quite a bit. I just have one question though, I am having trouble understanding why you would need to cast the object into a (Student)? What is the reason for this?

Ответить
@medinasFamily
@medinasFamily - 02.03.2020 02:03

great explanation and easy to follow.

Ответить
@WiiHack
@WiiHack - 28.08.2020 15:40

Danke



ANGRIFF

Ответить
@asht7788
@asht7788 - 20.09.2020 01:55

Thank you, I wish professors explained it this simple.

Ответить
@challuri1
@challuri1 - 05.11.2020 14:59

how to find earlier class link

Ответить
@conforzo
@conforzo - 01.02.2022 22:59

I thought we used to equals method just because we compare the content instead of the reference.

Ответить
@kassemdarawcha1476
@kassemdarawcha1476 - 05.03.2022 14:12

Thank yuo professoer

Ответить
@manpreetkaur5568
@manpreetkaur5568 - 20.04.2022 22:21

Thanks a lot. Very helpful

Ответить
@rejuyanahmed2947
@rejuyanahmed2947 - 24.05.2022 06:57

It was helpful. thank you sir.

Ответить
@mrpipiskin4
@mrpipiskin4 - 24.08.2022 15:10

ааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааа

Ответить
@leekbiel
@leekbiel - 14.09.2022 21:36

Thanks!!!!!

Ответить
@sarahoukaci7103
@sarahoukaci7103 - 15.10.2022 20:05

sucks

Ответить
@Egganopolis82
@Egganopolis82 - 03.11.2022 04:20

This was super helpful for me. I was getting confused on how to implement an Override equals method from scratch and this just cleared up all of my questions. Thank you!

Ответить
@anupam5886
@anupam5886 - 11.12.2022 17:39

Nin thika

Ответить
@Rockyzach88
@Rockyzach88 - 27.02.2023 22:43

Just to make sure I'm not missing something. Since the StudentID field is private, don't you need a public getter to get it from the argument object instead of dotting it? However it works for you.

EDIT: Nevermind, it's because they share the same class. I was thinking that encapsulation worked cross object too but no.

Ответить
@aq6910
@aq6910 - 02.03.2023 23:54

your implementation is wrong if we pass a value which is not an instance of Student we get an error, same if we pass null.

Ответить
@Sandeep-od1uc
@Sandeep-od1uc - 13.03.2023 05:52

I have a doubt here, On line 13 in student class the condition should be like this right ?? --- > (!this.getname().equals(s.getname())) because the calling Object is b.

Ответить
@supernovic99
@supernovic99 - 09.04.2023 15:54

These videos are amazing!!! Thank you so much!

Ответить
@sebahalabi6239
@sebahalabi6239 - 20.05.2023 12:33

thank you so match (يسعدلي الشارب)

Ответить
@28santagabo
@28santagabo - 04.07.2024 02:57

super helpful! thanks

Ответить
@sumonadas3640
@sumonadas3640 - 20.07.2024 09:05

LOve your demonstration

Ответить
@gehadesam9017
@gehadesam9017 - 08.11.2024 17:01

Thanks alot, I was struggling to understans it.

Ответить