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

preview_player
Показать описание
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:

Support wiseAss here:
Рекомендации по теме
Комментарии
Автор

This is what exactly I was looking for. Thanks a lot Ryan...! 😊

deshpasheeto
Автор

Weeks after searching a resource for knowing the reasonable difference - I finally found it!! Thanks a lot Ryan!!!!

alokporwal
Автор

Really appreciate the explanation. Most tutorials gloss over why these items are needed.

chriscampbell
Автор

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!

thelumiereguy
Автор

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.

ManishKumar-bbql
Автор

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

diontan
Автор

wow ... finally a crystal clear explanation .. thanks man

rifqiarfani
Автор

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.

LukeChavers
Автор

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!

ShubhamSinghMusic
Автор

Exactly what i was looking for. Thank you very much.

baoton
Автор

Whenever I wanna sleep, I come here to listen this guy.

ddthemaste
Автор

Thank you for this explanation! It was very good.

symbolykos
Автор

Thank you so much; I see the difference between behaviour and implementation.

osehiaseehilen
Автор

Interfaces share definitions, abstract classes can share definitions and implementation. Interfaces are better for polymorphism (implementing multiple interfaces), unless you want default implementation.

pythonxz
Автор

Dude this was so well explained. Thanks!

Aspiret
Автор

Really loved the explanation. Thanks a lot Ryan

shonubijoye
Автор

i thought this guy is Ed . Snowden *.*

eliassherlocky