Тёмный

Programming: When EXACTLY to use an Abstract Class? Java & Kotlin Interfaces vs Abstract Classes 

Ryan Michael Kay
Подписаться 19 тыс.
Просмотров 15 тыс.
50% 1

A viewer asked a question about why I preferred to use an Abstract Class over an Interface in an older video on the Open/Closed Principle, and I thought I would use this opportunity to explain exactly why I think yuo should use an Abstract Class over an Interface. Although the original video was about a Java example, you can apply this same principle to Kotlin. Just be aware that Kotlin also has Extension Functions, which are often a great substitute for Abstract Classes!
Follow the wiseAss Community:
/ wiseassbrand
/ wiseassblog
/ wiseass301
wiseassblog.com/
/ ryan-kay-. .
Support wiseAss here:
www.paypal.me/ryanmkay

Наука

Опубликовано:

 

6 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@deshpasheeto192
@deshpasheeto192 3 года назад
This is what exactly I was looking for. Thanks a lot Ryan...! 😊
@dogukandogan2414
@dogukandogan2414 2 года назад
Whenever I wanna sleep, I come here to listen this guy.
@thelumiereguy
@thelumiereguy 4 года назад
A junior Dev here Had this question in my mind for a while now I look it up and what do you know... my favourite youtuber has a video on it Thanks man!
@chriscampbell5901
@chriscampbell5901 3 года назад
Really appreciate the explanation. Most tutorials gloss over why these items are needed.
@wiseAss
@wiseAss 3 года назад
Ironically that is the most important part as far as these particular topics are concerned. Glad you enjoyed it.
@alokporwal007
@alokporwal007 3 года назад
Weeks after searching a resource for knowing the reasonable difference - I finally found it!! Thanks a lot Ryan!!!!
@wiseAss
@wiseAss 3 года назад
You're welcome, Alok. “The real problem in speech is not precise language. The problem is clear language. The desire is to have the idea clearly communicated to the other person." - Richard P. Feynman
@alokporwal007
@alokporwal007 3 года назад
@@wiseAss That's a great quote. You are surely a wiseAss. JK :p
@ManishKumar-bb5ql
@ManishKumar-bb5ql 2 года назад
Exactly what i was searching for last 5 months... it was there always... few words of yours connected them together and now i have +ve vibes for Interfaces and AC.
@rifqiarfani
@rifqiarfani 4 года назад
wow ... finally a crystal clear explanation .. thanks man
@ShubhamSinghMusic
@ShubhamSinghMusic 3 года назад
This was exactly what I was looking for! Glad I came to this video.. saved me a lot of effort. Thanks a lot bud :) Great explanation!
@idanqwe1
@idanqwe1 3 года назад
Great explanation
@diontan7096
@diontan7096 4 года назад
thank you very much for the explanation. I just got a question from interviewer regarding to this. I blew it because i was always confused when it's a good choice
@klindickristijan
@klindickristijan 3 года назад
Very well explained! Thanks
@symbolykos1810
@symbolykos1810 3 года назад
Thank you for this explanation! It was very good.
@shonubijoye9196
@shonubijoye9196 3 года назад
Really loved the explanation. Thanks a lot Ryan
@baoton5154
@baoton5154 Год назад
Exactly what i was looking for. Thank you very much.
@nested9301
@nested9301 2 года назад
Wow the best explanation ever!
@Aspiret620
@Aspiret620 2 года назад
Dude this was so well explained. Thanks!
@rajibsarker3729
@rajibsarker3729 4 года назад
awesome explanation.
@anime4u568
@anime4u568 3 года назад
thanks for this amazing explanation
@ayushjain7555
@ayushjain7555 Год назад
Thanks Ryan!
@osehiaseehilen5718
@osehiaseehilen5718 2 года назад
Thank you so much; I see the difference between behaviour and implementation.
@nima7605
@nima7605 Год назад
Awesome explanation
@nixer8605
@nixer8605 3 года назад
great video,thanks
@cookval
@cookval 4 года назад
best way to describe this!
@nbk1727
@nbk1727 2 года назад
Thanks Ryan
@islandofdoctormoreau
@islandofdoctormoreau 2 года назад
great video. thanks!
@muazbhatti41
@muazbhatti41 2 года назад
Great explanation 👍
@LukeChavers
@LukeChavers 4 года назад
First, thank you for making videos, you seem like an awesome dude. IMHO: ditch the white-board and speak while you code. I appreciate it either way.
@amirbahador.developer
@amirbahador.developer Год назад
ty 🙏🏻🌷🌹
@subindsuresh4897
@subindsuresh4897 4 года назад
Thanks bro
@oliveryt7168
@oliveryt7168 3 года назад
I liked this.
@justloveandpeace4010
@justloveandpeace4010 Год назад
Beautiful bro
@HtopSkills
@HtopSkills 5 лет назад
Interface vs Abstract Class 📹📼
@pythonxz
@pythonxz Год назад
Interfaces share definitions, abstract classes can share definitions and implementation. Interfaces are better for polymorphism (implementing multiple interfaces), unless you want default implementation.
@yendys74
@yendys74 2 года назад
Wowwwww
@jagadhisshdeveloper1689
@jagadhisshdeveloper1689 3 года назад
super super,,,,
@catomajorcensor
@catomajorcensor 3 года назад
default interface methods
@MarketingGuru2024
@MarketingGuru2024 4 года назад
🐤🐤🐤🐤🐤
@irrefl1672
@irrefl1672 3 года назад
You looks like Bjorg LothBROK
@wiseAss
@wiseAss 3 года назад
SHIELD WALL
@irrefl1672
@irrefl1672 3 года назад
@@wiseAss Can I ask how to deal with some boss who thorws shit to your work specially when they dont know the ttechnology what you are using. He looked for ways to get me off my job. Know i am looking for and i want to destroy all things that blocks me help me please to be like Bjorg Lothbrok
@wiseAss
@wiseAss 3 года назад
​@@irrefl1672 Yes brother; I have dealt with bad bosses in the past. I suggest three ways to handle this situation. I will not encourage any particular way, because it depends on what outcome you want and the details of the situation; I do not know such things. I suggest only one thing for certain: be sure to have a calm mind when you decide what to do. A Calm mind is better at solving problems than an angry one, even in war. 1. Be the better person. The greatest insult you can give to your boss, is to succeed at your job and win the support of your other coworkers no matter what kind of bullshit he throws at you. Believe me, if your boss really is an idiot or doing a bad job, your coworkers (assuming you have coworkers), and possibly even the boss of your boss will be aware of this. Talented people are always in demand, and if you can succeed under a bad boss, then you are a very good employee. 2. Quit. If this is the head of a company or just a middle manager who is family friends with the boss, or for whatever ever reason option 1 would not work, then start looking for another job. Some people really can block you from improving, and it can be hard to decide whether dealing with them is a waste of time, or helping you to develop important skills like patience and effort. 3. Go "over his head". This is only an option if your boss has a boss. To go over his head is an expression which means to tell the boss of your boss, that your boss is causing problems for you and the company. In truth, I think this is probably not a good choice, because it is very rare that this tactic succeeds. In fact, unless you have the respect of this person, at best nothing will happen, and at worst it will come back to bite you. Hopefully that gave you some ideas at least. Good luck.
@irrefl1672
@irrefl1672 3 года назад
@@wiseAss now i read this i can't believe how you read my mind because of this, He told me: you have to deal with people who treat you like trash like me. You don't know how many times I've had to put up with my boss's screams, it's the lesson I should teach you .In this moment i thought that he has repeating the same behavior that his boss with me. He wanted I obey this orders and don't questionate his stupidity. An insecure one who constantly bragged about his system that no one used. When I started working he put me to support his shitty system, whose bugs and technologies had been reported as useless but I still force myself to see his first job. Thanks for your time, really thanks.
@eliassherlocky9088
@eliassherlocky9088 4 года назад
i thought this guy is Ed . Snowden *.*
@nicolacasali8304
@nicolacasali8304 4 года назад
Damn, I thought it was Bjorn Ironside.😂
@eliassherlocky9088
@eliassherlocky9088 4 года назад
@@nicolacasali8304 mixed SnowdenBjorn
@prajwalkore375
@prajwalkore375 3 года назад
Ed Sheeran teaching java
@muhammadukkasha5048
@muhammadukkasha5048 4 года назад
you look too innocent .
Далее
Difference between Interface and Absract Class
30:52
Просмотров 178 тыс.
Abstract Classes and Interfaces
26:34
Просмотров 304 тыс.
меня не было еще год
08:33
Просмотров 2,5 млн
Макс Пэйн - ТРЕШ ОБЗОР на фильм
47:02
Kotlin Abstract Class Tutorial with Example
13:02
Просмотров 10 тыс.
OOP 5 | Abstract Classes, Interfaces, Annotations
1:10:42
Interfaces vs Abstract Classes
14:43
Просмотров 13 тыс.
Kotlin abstract classes and interfaces in 20 minutes
24:13
What are Kotlin Interfaces Used For and Why?
8:36
Просмотров 4,9 тыс.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
iPhone перегрелся, что делать?!
1:01
Игровой Комп с Авито за 4500р
1:00