Learn How to Use Abstract Classes
HTML-код
- Опубликовано: 25 июл 2024
- In this video you learn how to use java abstract classes.
Also, register your interest here for Amigoscode Bootcamp: amigoscode.hopp.to/bootcamp-r...
Don't Forget to
===========================================
💯 Subscribe to Amigoscode - bit.ly/2HpF5V8
💯 Courses Available for free here - amigoscode.com/courses
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
#amigoscode #java #abstractclass
🙊 Here are the goods for all my videos video 🙊
► Recommended Books
===========================================
- Clean Code - amzn.to/2UGDPlX
- HTTP: The Definitive Guide - amzn.to/2JDVi8s
- Clean Architecture - amzn.to/2xOBNXW
► Computer and Monitor
===========================================
- New Apple MacBook Pro - amzn.to/3464Mmn
- Dell 27 INCH Ultrasharp U2719D Monitor - amzn.to/2xM3nW1
- Double Arm Stand Desk Mount - amzn.to/3aYKKfs
- USB C Hub Multiport Adapter - amzn.to/2Jz7NlL
► Camera Gear
=============================================
- Sony ILCE7M3B Full Frame Mirrorless Camera - amzn.to/346QIJn
- Sigma 16 mm F1.4 DC DN - amzn.to/2wbic3Q
- Sigma 33B965 30 mm F1.4 DC DC - amzn.to/39G37Fd
► IDE & Tools I use for coding 💻 🎒
===========================================
- ITerm
- VsCode
- GoLand
- IntelliJ Ultimate
- Sublime
P.S
===========================================
💯 Don't forget to subscribe | bit.ly/2HpF5V8
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
💯 Follow me on Instagram | bit.ly/2TSkA9w
❤️ Thanks for watching Наука
i so thankful for everything you do over here!!! ALWAYS amazing. Thank you
Hey Nelson - great content! Love to see patterns like this explained.
I've already built the biggest part for my MSc thesis project because of you... Don't know how grateful I am for your contributions, not only for me but also to the developer community.
You may join the courses?
Amazing, I saw that there are abstract classes but never knew what are they really for. Thank you for sharing
Of course it makes sense as always. Thank you so much man.
The very clear explanation. Thank you. Even we can have default implementation for method clear in abstract class. That can help us to modify the code much easier when the method is just needed to be implemented by some classes. Thank you so much for your useful videos.
I very much appreciate and enjoy your content and the way you teach. I’ve been learning a lot from you and just wanted to say thanks for doing what you do 🙏
It's a fine content but he still always acts religious in a very annoying way, it would be better if he keeps his beliefs to himself and keep it professional
@@moathdw910 when you grow up you'll realize a few things. First - just because someone is religious, doesn't mean they're acting religious. You're angry at something that literally isn't referenced or talked about in any of his videos. Just because he wears traditional clothing? Man - people still have a long way to go. Second - even if he did bring his religion into this, it's a good thing to get different perspectives from different people. Don't be so afraid of things that are different from you and maybe one day you'll be able learn all the world is willing to teach you.
@@moathdw910 It is authentic way of professionalism. Change your vision, saying hello in Arabic does not make the content religious.
I have never heard of anything about "create" action as a religious way.
he also says "Voila!" which does not makes him a francophone
Hi @Amigoscode, I have been following your content for quite long. It's really incredible work you are doing to help all of us. Thank you very much. And I always face challenge in understanding the existing code (mostly I work on Java) when I am moving across new projects. I really appreciate if you can prepare a video on how to understand existing code base of JAVA. Thank you once again.
Very useful video bro 👏🏾. Definitely what I need to improve a project I’ve been working on
Very very clear explanation!,with real example, yes, thats true, you will never see Dogs, Cats,Squares, rectangles, foo and bar in production!, you will see business procesess like this!.. Thank you very much for your useful video! 👍👍
Could you do the same video but with interfaces? I feel like they have become more complex with each Java release. You seem to have such a great understanding of it
Would be great. He already said that programing oriented to interfaces is better and is quite difficult to learn how to use it.
Great example, thanks for breaking it down. Cheers.
Awesome explanation, thank you!
This is a great explanation, thank you so much!
Thanks for all your content, from Cuba !!!
Wow, I liked that a lot, thanks! Strong content!
Thank you for your explanation
I have one remark about the method parse i think you can imporve it by avoiding boilerplate code and leagcy classes to read file and you can use Files.lines and It will return a stream and you can do filter on this stream and create another method to test the regex and apply this method on filter method .
I never thought of using abstract methods declared on an abstract class. Thanks a lot.
Wonderful lesson!!!! Thanks a lot
It is a very good designed video and very helpful for software developers.
Very good! Thank you
Thanks for your content, great quality. Greetings from Mexico my friend :D
Nice and concise.
Great bro! Thank you
Since you are producing/exporting reports, you could implement the visitor behavioural pattern on the abstract class and implement a visitor interface that accepts an export feature
Thanks for going further than the "Animal" "Shape" stuff. I never understood how to "Actually" do it with those examples.
Thanks for the great video, what color theme are you using?
This is a gem.
Since I was aware of the factory design pattern (very similar to this) I use it whenever I see it can fit :) Thanks for the great video! Cheers
Thanks you amigoscode
finally: an explanation hitting its target 100% huge youtube, yet so many videos are too "abstract" :D
thx for real example!
Hey, great job brother
Thanks!
Thanks bro!
Thanks so helpful
Funny, but more interesting than Java classes in College! :)
That non abstract method inside abstract class which call abstract method is make me understand after all. Thank you
hello
very nice video about important thread in Java.
is good review some principies abou t the way to code better all days.
Many thanks
Thank you very much
very clean, machallah
Watching from Nepal,🇳🇵
lots of love😊
Brilliant! :)
Wouldn't it be better to have default implementation of clean function (in this case only return input) in abstract class and then override it in child classes only where you want new functionality?
It is good idea.
great example and thanks for not using "cats and dogs"!!!
please more of this pragmatic and uselful stuff.
I was so annoyed at being taught complex design patters and design principles with squares, circles, apples, bananas, etc. Thank you for this very helpful example!
Amazing video. Could you please tell me what theme are you using?
Im preparing for interviews in January so now Im just browsing youtube reviewing stuff 😄
Hats-Off 🙌🙌🙌
Nice video ! Can you have a video how to deploy microservices into AWS ?
Make a video about design pattern in java, thanks🙏
Salam aleykoum amigoscode, hi everybody
Can you make a video of what do you think about remote work. What is your experiences, how did you live the COVID time working from home?
What are the pros and cons of remote working?
Thank you and big up !
Hello sir. Please someone recommended your channel for me. Please can you show me how to start with jsp from downloading intellij to running a first program. Thanks for reading
Good content as always, Nelson! Just one question, is it better to make the non abstract methods become static on the abstract class? So that we dont need to instantiate an object. Example, instead of
new NumberExtractorReport().prepareAndSendReport(path)
We could do this:
NumberExtractorReport.prepareAndSendReport(path)
It is not better, but you could do this, if you want.
what is difference between interface and abstract class?
Sincere request to create a Java playlist where an order of the videos for a complete beginner sir...
Is regex testing available in intellij community?
Can make video on method return abstract class ?
I might learn java, i know c++ , python and javascript
As-salamu 'alaykum bro. Can you do a video on CI/CD? :)
what font do u use in this video
Please launch design patterns course on your website
please make video on tomcat!
Wa alaikum Salam.
Instead of making the clean() abstract, would it be better to implement it to return unmodified value. That way existing classes don't need to be modified with clean if it's not needed?
Only subclass if the phrase "is type of" is true. Also, keep this in your head whenever you are designing..,.. "prefer composition over inheritance" and you'll not go far wrong. Also remember a class should only do ONE thing and do that thing well. As soon as you start mixing concerns, your class becomes needlessly complex and breaks the Single Responsibility Principle.
What do you think about naming abstract classes like AbstractEmailExractor? I know naming is controversial and sometimes hard. :D
as usual, your example is just Hello World
*_Can show examples Spring+Abstract class + Generics_*
I think it will be more useful
Thank you for your effort
I would like to join your boot camp
Do Servlets and jsp
Where should i use final class?
Register your interest here for Amigoscode Bootcamp: amigoscode.hopp.to/bootcamp-register-interest
there is a problem with the link it gives an error page
Mashaallah bro
you smart work
@@michelchaghoury9629 Hi
Thanks very interresting. However I do not understant thé diffences wirh the interfaces
First comment ☺️
Assalamu aleykum my brother 👍 good video! We need to refresh our memory all the time.
when to abstract class and when to use interface?
Why should I use Open JDK instead of Oracle Open JDK when both can be use commercially. Thank you.
how come when I click the discord, it doesn't work?
Is it possible to use interfaces here instead of abstract classes? What are pros and cons? Thank you for video
Depends on your situation. If you would use interfaces in this specific example you can not have a common parse() method and you will have to copy the same code in the parse method of every implementation of the interface. And this exceeds the DRY (dont repeat yourself) principle
@@TransitionPhase Interfaces can have default methods (methods with implementation). Since Java 8.
@@noss403 Its true thx for noticing, I forgot that's possible. Then i guess it's the best to use abstract classes in this case cause interfaces are more generic in what they promise to do.
How much salary give your company for you
But what is the difference between polymorphism and abstract classes then? Are they serving the same goal?
Please please, guid me which tech skill i should learn so I land a job in halal compony. There are so many haram stuff in software development and many tech industry. Please please guid me. ❤️🙂
Mashaallah bro
Why make the PATTERN static?
Thank you so match , this is very great 🤍
what's the difference between Abstract classes and Interface with default methods. Anyone?
You can have common functionality on both abstract class and interface.
You can't implement methods on interfaces, so in his example, he would have duplicate code on both NumberExtractor and NumberExtractor with the parse method.
@@mychellmotta6639 Since java 8 you can have default methods in interfaces
No. You needed to override the parent method in the EmailExtractorReport class and wrap the parent method in your new clean method. You yourself say that classes should be open for extension but closed for modification.
Why don't use interfaces ?
I don’t understand anything after the reading of the files part :(
Says he won't do the typical animal example. Proceeds to do exactly that
fr lol
Los Pollos Amigos
Abscract / abstract? Is it only a typo or a slang?
Wouldn't it be better to write code like this:
(in parse method)
if(!scanner.hasNext())
{
return "Empty file";
}
scanner.nextLine();
....
Use kotlin
whos deliting my comments?
Him : salam alaikom
Me : subscribe, like
yes no more cats ands dogs..... :)
just dont use them
@amigoscode nice explanation
Great example, thanks for breaking it down. Cheers.