Love that you explicitly ask and answer the question that every beginner would have: "Why would I want to do this?" Five stars.
@bodinian
2 жыл бұрын
agreed
@LaGrossePaulik
Жыл бұрын
Exactly! I understood the concept, but didn't get why and when we should use it... it's like reading a manual of a hammer, but not knowing when I should use one!
@dmax7400
Жыл бұрын
Right?! I think this is why his tutorials/explainations are so good. I am always asking "Why?" or "When?" when learning about these concepts.
@junner13
Жыл бұрын
Yes, that's why Im always looking for his videos, just for that question
@leoMC4384
Жыл бұрын
When John starts "Now, you're probably thinking...", you're like "How did he know what I was thinking?" 😅
@MrShamrock244
3 жыл бұрын
Been staring at and abstract problem for hours trying to actually understand whats going on. Clarified it in a few minutes perfectly. Thanks Man!
@AhmedOmar-uf3gu
2 жыл бұрын
I wanna cry at how good these videos are, your explanation and walkthrough is just flawless. Thanks John I REALLY appreciate the work and content you're putting out here man, seriously appreciate you.
@micleh
2 жыл бұрын
You really have a knack of explaining seemingly complicated concepts easily. Thanks!
@younesmdarhrialaoui643
Жыл бұрын
I'm learning C# but since it inherits a lot of concept from Java these videos are just as useful to me as the are to a Java programmer.
@whiteliszt8805
3 жыл бұрын
"sounds very poopy" :D
@CodingWithJohn
3 жыл бұрын
🔊💩
@SolidJungle
2 жыл бұрын
My god, you were able to explain everything in just a few minutes when it was taking hours for myself to understand. Thank you!
@JusQuelle
3 жыл бұрын
Probably one of the best explanations I've gotten so far about abstraction. I've been so stuck on this concept, but now I have a better understanding on how to tackle my assignment. Thank you!
@BlazingStar2001
2 жыл бұрын
Yeah, sometimes weird examples really helps u understand concept.
@meostyles
2 жыл бұрын
Also worth noting that abstraction as a concept is great for making your code maintainable- if you decide later on to use some other implementation, you can switch it out because it implements the same abstract class, and calls on it won't break the rest of your code
@LeighHughesSenlis
2 жыл бұрын
This is clear and engaging. Excellent!
@christopherdevadhas3359
2 жыл бұрын
I have never understood the Difference easier in my 6 years of experience. But you Made me understood this in juz 6 mins. A Royal Salute...
@Sollace
2 жыл бұрын
In recent years with the addition of default methods, Interfaces have really become so much more like abstract classes... In a way it fits, since default methods can inform part of the contract interfaces originally meant to enforce, and of course Interfaces still can't contain data, so no non-static fields.
@omer4826
2 жыл бұрын
Dude, you truly are amazing. Thank you. I'm an engineering student and you have teached me far more than any of my programming professors have!
@7ol35
2 жыл бұрын
Couldn't agree more
@anamh5701
9 ай бұрын
but why did my teacher says its for hiding data?
@nareshboddupalli4429
6 ай бұрын
Abstract classes have declaration and it can be instansiated, but not have any definition.
@tarunsoni6971
Жыл бұрын
That last part with that almost straight face was so funny, people be binge watching something on netflix and I be binge watching your videos they are so crisp and clear and easy to understand, a bow down to you.
@dizzlemaker9504
9 ай бұрын
"That might be the weirdest sentence ever said in a Java tutorial." well, that is clearly a statement, and a fact.
@AGriffith
2 жыл бұрын
What an awesome explanation my friend, this is why I always think there is a lot of gold free content on internet, you just gotta find it
@sonamohialdin3376
Жыл бұрын
So good tutorial thank you
@user-jx5cs1xv5i
3 жыл бұрын
You are such a great teacher very simple and clear.
@praveenkadambari7394
2 жыл бұрын
Wow. What a way to clear up the mess I had on my brain since long time. Now I can make my mind when to use what. Thanks a ton brother..!
@deimanteadeikiene4153
2 жыл бұрын
I can feel the effort that was put into this video :)
@saurabhs009
2 жыл бұрын
This video is beautiful.. Please make a whole series on java programming and frameworks, it would have some of the less privileged ones to actually learn and do something on their own. Thanks :)
@IamNotThePlayer
3 жыл бұрын
Great tutorial for beginner like myself :-) Thank you very much. I was wondering if you would like to make some simple tutorial for Java Spring also.
@CodingWithJohn
3 жыл бұрын
Glad you enjoyed it! I'm thinking of doing something on using Spring Boot specifically, but it may be a bit of time away.
@ColonelloRS
2 жыл бұрын
Amazing tutorial, absolutely read my mind at 1:06 haha
@me-wi8vf
4 ай бұрын
Thanks a lot for sharing your knowledge. I am still learning very important details from you after 20+ years of experience. You are one of the best teachers out there on java. Hats off to you sir.
@paulchuang9247
7 ай бұрын
Interface: "other types of classes will be able to poop even if they aren’t animals." Should I memorize this example for future interviews? 🤣
@alexeysytnikov6220
4 ай бұрын
I guess one more difference between Interfaces and Abstract classes is that in an Interface you can't have method implementation, only declaration.
@nonoobott8602
2 жыл бұрын
Wow. In just a few mins you clearly explained concepts that weren't clear to me. You're phenomenal. Thanks for this
@AvdhootSawant-kz3ly
10 ай бұрын
Abstract class or interface enforce child class to implement the abstract methods but How abstract class or interface hides internal implementation in java ?
@mythilikalidasan
2 жыл бұрын
Got much clearer undertstanding when and where to use Abstract and Interface. I never saw anyone explain this easy and quick. Would be happy to learn more concepts from your videos.
@injectionregex1293
Жыл бұрын
Interviewer: so, when would you use an Interface? Me: when we need other classes to "poop", even if they are not animals
@rajprasadshrestha6963
Жыл бұрын
Really loved the explanation thanks waiting for Spring boot course 😅
@kalaiselvan539
2 жыл бұрын
We can do all interface things in abstract as well right . Then what's the need for Interface ??
@victorejiofor8115
2 жыл бұрын
It can't be explained better than this... you solved my headache in 7 minutes. Thanks so much.
@mafakka2
2 жыл бұрын
does anyone know Nathan Schutz from smooth java? what happened to him?
@8PrinsAli8
2 жыл бұрын
The tempo/pace of your uploads are really optimal. You keep it on point without getting into bunch of sidetracks. Those times I've wanted to quickly understand a topic and chose one of your videos, I've never felt restless because of slow talking or too much information and yet got a good understanding of the topic. Keep it up!
@barathiraiyarul4498
7 ай бұрын
I Felt the exact same thing. I just wasn't sure how to express it and you are on point 💯
@RefaatIbrahimXIT
4 ай бұрын
Hello John Abstract Class is a flexible dynamic Interface and I can say it is a CONTRACT Statement that we NEED and Must enforce the client to apply for example. Thank you so much for your clear video. Allah bless you. Regards
@johntravolta2655
2 жыл бұрын
Another coment. Tbh i have never seen a better programming chanel in my whole live. Explenations are always on point, I always get it straight away. We appreciate your work :)
@ShamefullRS
Жыл бұрын
This video was so succinct, to the point, and helpful. Thank you! I know you made this video a year ago as of now and I imagine your videos have only gotten better and better, but I did want to offer one suggestion: I felt that several times during the video it was very hard to keep track of what you were talking about while you were jumping back and forth between class, interface, abstract class etc. I had to rewind video several times and pause just to think about the last thing you said. It could just be me! But as a beginner, I suggest you keep that in mind and try to slow down the jumping back and forth and explaining a little slower. I dont know how else to put it. Once again, fantastic video, and super informational! Even though I had to rewind parts, once it clicked and I went onward it just all made sense and there wasn't a lot of fluff.
@vasudharana6664
Жыл бұрын
i have been trying to understand this for the past one hour and this 7 minute video made the concept crystal clear in my head thank you so much :)
@mahodaadikari4116
2 жыл бұрын
Thanks john. I was doubtful about this for years. Your crystal clear explanation made me understand this properly today ❤💯.
@adipurnomo5683
Жыл бұрын
2:42 what difference abstract method vs interface method
@MrRightNow
Жыл бұрын
This was a fun lesson, actually made me laugh 😂
@JTBanks
2 жыл бұрын
Here I am, back on this video after viewing it a while back while in school. Just recently graduated and when John says it's a common interview question...it really is. I just had an interview and I was only able to explain an interface ☹️. Word to the wise, listen to John! ❤
@CodingWithJohn
2 жыл бұрын
Nice work!
@lillyberta422
2 жыл бұрын
Thanks a lot
@celikart
2 жыл бұрын
nice explanantion in a short time , very effective . Do you have videos on Udemy ? like advance java , spring ,angular or etc. courses.
@obsessedwithJBJ
Жыл бұрын
Thanks! This really cleared it up in my head, I was struggling to figure out why we would want to!
@christiangiamalis9924
Жыл бұрын
you have tought me more in 7 minutes than my professor has in 45
@minotaur470
Жыл бұрын
If I ever drop out of college to become a freelance programmer can I pay you my tuition for lessons instead
@CodingWithJohn
Жыл бұрын
Deal
@Dima-wd4cf
Жыл бұрын
that's the best explanation i've ever seen on this topic
@daiyrkanybekov8575
2 жыл бұрын
Great video bro. Appreciate this kind of tutorials. Keep it going. Hello from Kyrgyzstan 🇰🇬🇰🇬🇰🇬
@TheBluePhoenix008
6 ай бұрын
This made me understand everything that's been missing from my course for the past 2 years. It'll help me greatly, thanks!
@seseorang9852
Жыл бұрын
Piyuh ndak mampu masseh😎😎
@feeetus4067
Жыл бұрын
When a 6min video is more efficient than an hour class of abstraction and interfaces 🙌 earned a sub brother appreciate the finals help 🙏
@humanperson1418
3 жыл бұрын
Thanks for clarifying this! Best video on the subject that I can find!
@nayankumar9113
11 ай бұрын
no better way to explain it. Thank you so much John, highly appreciated.
@mohamedlegtibi802
Жыл бұрын
Finally I'm able to understand the difference. Thank you John for your explanation. Greetings from Morocco
@jackng9918
9 ай бұрын
This 7 minutes video is much better than the long 2 hours lecture Really appreciate your comunnication skills and ur effort devoted on this video
@aleksandermo7061
2 жыл бұрын
Quick question, didnt quite understand why you put the int age and String name into the code? Does it change anything on variables? Just checked if i could make the variables without initializing them/using them and it worked just fine? Just a qurious question :-)
@רועיע-פ1ט
Жыл бұрын
abstract methods be like:
@DiaborMagics
18 күн бұрын
THANK YOU! I watched other tutorials before on interfaces and during and after each one I was thinking: ok, but why? We have superclasses already. At least you acknowledge why that is confusing. It's now clear to me that indeed a superclass is better if you don't want all variables to be the same and interfaces are like set-in-stone blueprints. What I don't yet quite grasp is why you would want to use an interface over a superclass. It sounds to me like a superclass is always better; EXCEPT 1 thing I can think of is when you need more stuff than your superclass provides, since you can only extend once. Additional blueprints could then be taken in by implementing interfaces. That's the only thing I can think of. Maybe an edge case idk, I'm only just learning about this, but what do you do if you need more stuff than your superclass provides, but that stuff needs to not be final, so an interface won't do the job? Also I'm not entirely sure about an abstract non-superclass non-interface vs an interface. Which and why. And finally: in an abstract class you cannot create a body. But if you want a bunch of classes to implement the same methods the same exact way; can you do that with an interface then? Can you add a body to interfaces? I assume not because they are also abstract. If not with an interface, then how? Just using a different class and that is not technically a blueprint, an abstract, or an interface, but just a regular class that has that method and then just create an object of that class in each class that uses that exact implementation of the method? EDIT: Do I understand the differences between superclasses and interfaces right, including when to use which one, if I say the following: Classes are blueprints for objects, superclasses are blueprints for classes, interfaces are blueprints for classes and superclasses. A class can only extend 1 superclass, but implement multiple interfaces. Typically you would use a superclass if you need multiple classes to inherit stuff from the superclass - these things can be anything from final and non-final variables, to abstract and non-abstract methods. Interfaces are abstract only. Everything in an interface must be included in a class that implements it, but not everything in a superclass MUST be included in a class that extends it. An example I thought of both to clarify this to myself and to explain how I so far understand it is: you can make a superclass Character, (sub)classes Game1Characters, Game2Characters and so on, which extend Character. All characters have names and such. But not every game is equal and therefore some characters have different things in common with characters from different games. An example here would be if Game1 and 3 have magic, but Game2 does not, Game1( and 3 )Characters could implement a MagicalWorld interface and Game2Characters could implent a NonMagicalWorld interface; so that the characters who have magic, can all get stuff related to magic, while those without magic, will not.
@alessandrodri6667
24 күн бұрын
clear, funny, useful. I'm a beginner in java programmation and my professor was not that clear on this subject, i didi a quick research on yt to find someone that could explicate this argument and i casually found you. I guess i'm going to visit your page more often!!
@pedjadjape1
5 ай бұрын
Hey man, amazing video ! Exactly what I was looking for! I was looking for abstract class vs interface , and this was exactly that. Even though you didn't mention "interface" in your video's title. Consider doing that maybe. YOUR EXAMPLES ARE REAALLY GREAT ! Carefully chosen to explain the core diferences. I don't recall anybody explained that better. I don't usually write comments on youtube, but you deserved it, my man!
@Ruveydaa
11 ай бұрын
Short and clear explanation - that's what a beginner needs. Thank you so much John!
@Alibeee87
2 жыл бұрын
"Probably the weirdest sentence ever" 😅 You're my favorite KZitem teacher!
@lianhong542
2 жыл бұрын
Wow, I am starting to wonder if my teacher intentionally confuses us to make us fail. It is this simple when you explain.
@omnivoreO
Жыл бұрын
I feel like this is a really good explanation but I am still so damn confused on what I’m supposed to do with any of this 😂😂
@philbowden
6 ай бұрын
Hi John. Love your videos. Great for brushing up before interviews. (FYI I'm a subscriber :-)) Anyway, my question is, can you , or anyone, think of a good example where you would want to static final field in an interface? I can't come up with one.
@user-rg9gc1wd7n
2 ай бұрын
say 'Poop' and BAM! you have 100% of my attention. Guess i will no longer forget the difference betweeen abstract class and interface..thanks a lot... am sharing this complete playlist with my whole class as we all still have a lot to wish for after our teacher is done explaining
@fadhilshuma3597
2 жыл бұрын
You are Good As Hell ..... But Daaamn You Just Do everything too Fast Mann ..... !!! I even had to slow you down ..... !! But Thanks Mann ... This Helped Me ....👊👊
@suwatchainanchai6637
2 жыл бұрын
Thank you so muck for your lesson. I have stucked in a concept of abstract for so long. so now on I will consider using an abstract class in my project.
@HasanSahin-n8d
Ай бұрын
Cracks me up every time 6:27: "You can guarantee that other types of classes will be able to poop even if they aren't animals. That might be the weirdest sentence ever said in a Java tutorial." LOL
@duartelucas5746
Жыл бұрын
This is the best explanation for Abstract vs Interface in the history of mankind. Cat and Dog implementing Animal vs Dog and Robot implementing poo() through IWeirdInterface.
@mikloscsuvar6097
Жыл бұрын
1. Congratulations! The content's technicality and extension is excellent. 2. The microphone has a windy background noise. But it is tolerable. The pace is too quick. Especially at cat in abstractclass. It was hard to follow even with forwarding-backwarding. 3. If I know, that an animal is four legged, but do not have fur and may have wings and a beak (like a gryphon/griffin) I would surely instansiate an Animal class, because I can not cathegorize it at the moment into a more concrete class.
@RobRoss
Жыл бұрын
In C what you have just described would be considered pass by reference. I think this is a bad question to ask about Java because it’s inconsistent with how most other low level programming languages describe this mechanism. You couldn’t say “in C when we pass a pointer on the stack, that’s called pass by value because we’re passing the value of the pointer.” That would just be incorrect. This question only makes sense to someone that understands setting up a call stack, copying the arguments to the stack, and invoking the method. If someone doesn’t understand what’s going on with all that, asking if Java is pass by value/reference makes no sense, and forcing a definition of “it’s always pass by value” also makes no sense to me. 🤷♂️
@atrantech11
Жыл бұрын
I've just gone through 3 articles and 2 other youtube videos to fully understand the difference and only came out more confused. This after reading comments from those other videos saying "Finally! This has cleared it up!" But thanks to your poop analogy, I finally understand this crap.
@ТимурШайхитдинов-д2о
2 жыл бұрын
Difference between abstract class and interface. Examples: Animals that make noise and poop. Fucking legend! Thank you very much!
@hwane94
Жыл бұрын
seriously this was one of the best java explanation videos I've ever seen. Thank you John!
@christo4520
6 ай бұрын
lololol Man you made learning this really fun and funny. Thanks for your content man. Awesome stuff. Slappin that subscribe for suuuure.
@bhavya6060
9 ай бұрын
I got this question in my interview and at that time I couldn't explain to the interviewer for some interface examples . Hopefully now , I'll be able to provide some poopy examples xD . Thanks Man
@robiee1
2 жыл бұрын
Damn, already watching your 9th video and can't stop... Thanks for the tutorials! Sad that utube was recommending you on 6 place, even if the videos from other channels ware completely unenjoyable, full of adds, and barely understandable...
@paulgrossman8830
11 ай бұрын
Few questions for you, totally cool if you aren't able to get to it: Working on a project, and my mentor set it up so that we have an interface extending another interface. Can an interface implement another interface, or must an interface Extend and interface? Can an interface extend and/or implement a class, and can the Class be abstract? Can abstract classes extend and/or implement another class/abstract class/interface? Thanks.
@michelleelizabeth9956
3 ай бұрын
Thank you so much for explaining so well. You are way better than my university professor.
@mifzeena7390
11 ай бұрын
@5:29 when, you removed switched the cat class from extends Animals to implements AnimalStuff, still, the method makeNoise was there without an error, I need to know why? I'm confused
@cyberkiller83
Жыл бұрын
Hi John, as always, excellent video. Although, you forgot to talk about the default method implementations that were introduced with Java 8 on interfaces. That ALMOST made abstract classes totally useless, almost.
@hossamahmed5360
11 ай бұрын
well, I have to say U r good.. I've watched many videos but couldn't get the difference between them. Now I know the difference between them and the logical usa of both of them . Thanks ^^
@NotreallySerious695
Жыл бұрын
"The other classes will be able to poop even when they are not animals " that really is the wierdest thing I heard in a tutorial😂😂😂. Btw I recently found this channel as I was browsing about threads and I have to admit this is really the best channel I know for short and accurate tutorials with practical examples and questions like "why should i do that at all? " Answered in a engaging way ❤❤❤. Love from india❤.
@jessep2458
3 ай бұрын
dude you are so good
@Matelight_Repetition
Жыл бұрын
Dislike because you didn't mention the keyword "default" that is used to add a body in the interface method (in Java since 2014 added in JDK 1.8).
@markv566
10 ай бұрын
Always learning with you, thank you for making these videos, two questions: -Can I create an interface inside an abstract class? -Is it a must to not write anything inside the methods of an abstract method or Interface's method?
@Sylarleft
11 ай бұрын
This channel is such a bliss. Great content, and no useless wanderings on unrelated topics.
@iWatchYoutube2601
Жыл бұрын
Hey John real quick question. Why would I use abstract over just inheriting a class? Thanks!!!
@lalitarana4535
2 жыл бұрын
your explanation is too good ...thanks for making these short videos , its very helpful for us ...i am from INDIA .thanks again
@kamertonaudiophileplayer847
2 жыл бұрын
I used abstract classes a lot early days, but now, I provide just empty methods with a specific annotation - please implement! Why? It looks like I became mad with such classes. Perhaps you can change my view? But I guess you are too busy for that.
@lookupverazhou8599
2 жыл бұрын
Ok, so for the beginner, it's basically just a bunch of bookkeeping? Also, thanks, I've been watching about one video a day.
@thedawapenjor
6 ай бұрын
Wow. That was a pretty shitty explanation. Great work. I understand everything.
@Hufsa
2 жыл бұрын
When you implemented the poop method adding "Phlbblobpblbop" I felt like capitan America since I thought "I got that reference"
@ujeshnada5141
2 жыл бұрын
Learning 1. Abstract class can be 0 - 100 % abstract (means we can have some non abstract method) - while interface is 100% abstract, we can not have non abstract method at all. 2. Class can only extends 1 abstract class class - while class can implement many interface. 3. All the variable (fields) in interface are static & final : means we have to assign the fix value which can not be changed further. (ex. if we add name in AnimalStuff interface then its value will be fix for everyone) - but in Abstract class variables (fields) can define without instantiated which can be assigned later on. (ex animal must have name & age in given video but do not know what is should be so we can keep it in abstract class).
@smokestrong1000
Жыл бұрын
I wish that in college instead of going by a vague book, the teacher would go off someone's tutorials like this guys. Everything is explained well where you don't have to go searching around to learn a new concept. My book tells me on some programs. What is the answer to this question? Then doesn't give me an answer to check if I'm right or not.
@johncpope
2 жыл бұрын
If you have an abstract class CoolClass with an instance variable int age; and an interface CoolInterface with a (static final) variable int age = 3; and you create a class CoolChildClass extends CoolClass implements Coolinterface ... how does that int age variable work?
@ReviewSutras
5 ай бұрын
Can we say that Interface is a hack approach introduced by the creators of Java 🙂. Initially, they thought to prevent multiple inheritances but later on, had to do something which needed to inherit from multiple classes and hence they introduced the concept of interface.
Пікірлер: 658