Тёмный

Learn How to Use Abstract Classes 

Amigoscode
Подписаться 1,1 млн
Просмотров 68 тыс.
50% 1

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

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 120   
@amigoscode
@amigoscode 2 года назад
Register your interest here for Amigoscode Bootcamp: amigoscode.hopp.to/bootcamp-register-interest
@michelchaghoury9629
@michelchaghoury9629 2 года назад
there is a problem with the link it gives an error page
@flyingrecordofficial
@flyingrecordofficial 2 года назад
Mashaallah bro
@flyingrecordofficial
@flyingrecordofficial 2 года назад
you smart work
@flyingrecordofficial
@flyingrecordofficial 2 года назад
@@michelchaghoury9629 Hi
@andrekreou1
@andrekreou1 2 года назад
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.
@TeslaDo
@TeslaDo 2 года назад
You may join the courses?
@meanstoandend
@meanstoandend 2 года назад
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 🙏
@moathdw910
@moathdw910 2 года назад
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
@meanstoandend
@meanstoandend 2 года назад
​@@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.
@TeslaDo
@TeslaDo 2 года назад
​@@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
@hitstick567
@hitstick567 2 года назад
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
@MrBraga776
@MrBraga776 2 года назад
Would be great. He already said that programing oriented to interfaces is better and is quite difficult to learn how to use it.
@TheSpiderWalk
@TheSpiderWalk 2 года назад
Amazing, I saw that there are abstract classes but never knew what are they really for. Thank you for sharing
@TkmMusicProduction
@TkmMusicProduction 2 года назад
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! 👍👍
@abdedaimehicham2650
@abdedaimehicham2650 2 года назад
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 .
@ravienu9912
@ravienu9912 2 года назад
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.
@snoopie51
@snoopie51 Год назад
Thanks for going further than the "Animal" "Shape" stuff. I never understood how to "Actually" do it with those examples.
@cesarhinojosa7679
@cesarhinojosa7679 Год назад
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!
@dudnik399
@dudnik399 4 месяца назад
Great example, thanks for breaking it down. Cheers.
@johnronaldraviz4052
@johnronaldraviz4052 2 года назад
I never thought of using abstract methods declared on an abstract class. Thanks a lot.
@wgalloPT
@wgalloPT 2 года назад
i so thankful for everything you do over here!!! ALWAYS amazing. Thank you
@fipabrate
@fipabrate 2 года назад
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?
@noss403
@noss403 2 года назад
It is good idea.
@mandanakhashayar9678
@mandanakhashayar9678 2 года назад
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.
@genprimabiocakti6159
@genprimabiocakti6159 2 года назад
That non abstract method inside abstract class which call abstract method is make me understand after all. Thank you
@zimmtheking
@zimmtheking 2 года назад
great example and thanks for not using "cats and dogs"!!! please more of this pragmatic and uselful stuff.
@fonte1184
@fonte1184 2 года назад
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
@anastasiagavrilita6567
@anastasiagavrilita6567 2 года назад
finally: an explanation hitting its target 100% huge youtube, yet so many videos are too "abstract" :D
@davaa847
@davaa847 Месяц назад
Very good example. Thanks
@mikesabiking
@mikesabiking Год назад
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?
@dansmar_2414
@dansmar_2414 Год назад
This is a great explanation, thank you so much!
@isahbala2540
@isahbala2540 2 года назад
Funny, but more interesting than Java classes in College! :)
@DebugWithAdam
@DebugWithAdam 2 года назад
Of course it makes sense as always. Thank you so much man.
@daironperezfrias7819
@daironperezfrias7819 2 года назад
Thanks for all your content, from Cuba !!!
@RajkumarAdhikari
@RajkumarAdhikari 2 года назад
Watching from Nepal,🇳🇵 lots of love😊
@CityCata
@CityCata Год назад
Im preparing for interviews in January so now Im just browsing youtube reviewing stuff 😄
@EnchikO
@EnchikO 2 года назад
Why should I use Open JDK instead of Oracle Open JDK when both can be use commercially. Thank you.
@zzzzzzzzzz2588
@zzzzzzzzzz2588 2 года назад
Amazing video. Could you please tell me what theme are you using?
@Mac1355
@Mac1355 2 года назад
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
@rounder1000
@rounder1000 2 года назад
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 !
@stevegatspaul
@stevegatspaul 2 года назад
what is difference between interface and abstract class?
@fdov4
@fdov4 2 года назад
Thanks for your content, great quality. Greetings from Mexico my friend :D
@kamertonaudiophileplayer847
@kamertonaudiophileplayer847 2 года назад
It is a very good designed video and very helpful for software developers.
@sayyedmuaaz
@sayyedmuaaz Год назад
But what is the difference between polymorphism and abstract classes then? Are they serving the same goal?
@carlkarama
@carlkarama 2 года назад
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
@patco101
@patco101 Год назад
This is a gem.
@alexeygopro1282
@alexeygopro1282 2 года назад
Is it possible to use interfaces here instead of abstract classes? What are pros and cons? Thank you for video
@TransitionPhase
@TransitionPhase 2 года назад
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
@noss403
@noss403 2 года назад
@@TransitionPhase Interfaces can have default methods (methods with implementation). Since Java 8.
@TransitionPhase
@TransitionPhase 2 года назад
@@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.
@caffeinejavacode1475
@caffeinejavacode1475 2 года назад
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
@ianneilagasen2842
@ianneilagasen2842 2 года назад
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)
@noss403
@noss403 2 года назад
It is not better, but you could do this, if you want.
@rajendranaik7317
@rajendranaik7317 2 года назад
Sincere request to create a Java playlist where an order of the videos for a complete beginner sir...
@nedimkulovac6394
@nedimkulovac6394 2 года назад
Hey Nelson - great content! Love to see patterns like this explained.
@jesper9334
@jesper9334 2 года назад
Thanks for the great video, what color theme are you using?
@milanschacht3920
@milanschacht3920 2 года назад
What do you think about naming abstract classes like AbstractEmailExractor? I know naming is controversial and sometimes hard. :D
@igorsantanas
@igorsantanas 2 года назад
Wow, I liked that a lot, thanks! Strong content!
@hieubui5122
@hieubui5122 2 года назад
Thanks you amigoscode
@mamadoubobodiallo1216
@mamadoubobodiallo1216 2 года назад
Very useful video bro 👏🏾. Definitely what I need to improve a project I’ve been working on
@nikhiljose2029
@nikhiljose2029 2 года назад
Is regex testing available in intellij community?
@thanhlocnguyen4910
@thanhlocnguyen4910 2 года назад
Nice video ! Can you have a video how to deploy microservices into AWS ?
@000124021
@000124021 2 года назад
Awesome explanation, thank you!
@KangoV
@KangoV 2 года назад
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.
@sadiulhakim7814
@sadiulhakim7814 2 года назад
Where should i use final class?
@inoobbeyt1031
@inoobbeyt1031 Год назад
Can make video on method return abstract class ?
@trungthanh4134
@trungthanh4134 2 года назад
what font do u use in this video
@adilwise
@adilwise 2 года назад
Hey, great job brother
@petroniobonavides3530
@petroniobonavides3530 2 года назад
Wonderful lesson!!!! Thanks a lot
@talbiabdelali5914
@talbiabdelali5914 2 года назад
Great bro! Thank you
@brioquery
@brioquery 2 года назад
Nice and concise.
@alexyspol5221
@alexyspol5221 2 года назад
Very good! Thank you
@wagnernoise
@wagnernoise 2 года назад
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
@alimrad7760
@alimrad7760 2 года назад
Make a video about design pattern in java, thanks🙏
@aayush5474
@aayush5474 2 года назад
when to abstract class and when to use interface?
@wildjoe6259
@wildjoe6259 2 года назад
thx for real example!
@modoulaminceesay9211
@modoulaminceesay9211 2 года назад
I might learn java, i know c++ , python and javascript
@TheStrategist314
@TheStrategist314 2 года назад
how come when I click the discord, it doesn't work?
@EdwardNorthwind
@EdwardNorthwind 7 месяцев назад
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.
@pavanrai6196
@pavanrai6196 2 года назад
Please launch design patterns course on your website
@FahadAli-km3ll
@FahadAli-km3ll 2 года назад
As-salamu 'alaykum bro. Can you do a video on CI/CD? :)
@hoangtuan4592
@hoangtuan4592 2 года назад
Thank you very much
@treeteqs
@treeteqs 2 года назад
very clean, machallah
@Danish_Khan_
@Danish_Khan_ 2 года назад
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. ❤️🙂
@natanaelsc
@natanaelsc 2 года назад
Thanks bro!
@harrabiyosri1785
@harrabiyosri1785 2 года назад
Thanks so helpful
@christopherabelet4672
@christopherabelet4672 2 года назад
Thanks very interresting. However I do not understant thé diffences wirh the interfaces
@TeslaDo
@TeslaDo 2 года назад
Abscract / abstract? Is it only a typo or a slang?
@sovrinfo
@sovrinfo 2 года назад
Thanks!
@rabbyhossain9537
@rabbyhossain9537 2 года назад
How much salary give your company for you
@autoexec5367
@autoexec5367 Год назад
Brilliant! :)
@francksgenlecroyant
@francksgenlecroyant 2 года назад
Hats-Off 🙌🙌🙌
@travelers4178
@travelers4178 2 года назад
First comment ☺️ Assalamu aleykum my brother 👍 good video! We need to refresh our memory all the time.
@brimabah2163
@brimabah2163 2 года назад
I would like to join your boot camp
@USONOFAV
@USONOFAV 2 года назад
what's the difference between Abstract classes and Interface with default methods. Anyone? You can have common functionality on both abstract class and interface.
@mychellmotta6639
@mychellmotta6639 2 года назад
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.
@94JulianDavid
@94JulianDavid Год назад
@@mychellmotta6639 Since java 8 you can have default methods in interfaces
@raulrahaman9863
@raulrahaman9863 2 года назад
I don’t understand anything after the reading of the files part :(
@terabhai4955
@terabhai4955 2 года назад
please make video on tomcat!
@traviswhitten6452
@traviswhitten6452 2 года назад
Why make the PATTERN static?
@noss403
@noss403 2 года назад
Wouldn't it be better to write code like this: (in parse method) if(!scanner.hasNext()) { return "Empty file"; } scanner.nextLine(); ....
@94JulianDavid
@94JulianDavid Год назад
Why don't use interfaces ?
@thapelomorare1484
@thapelomorare1484 2 года назад
Do Servlets and jsp
@MudassirKhan-sx9jy
@MudassirKhan-sx9jy Год назад
Wa alaikum Salam.
@flyingrecordofficial
@flyingrecordofficial 2 года назад
Mashaallah bro
@erickshaffer6615
@erickshaffer6615 Год назад
Says he won't do the typical animal example. Proceeds to do exactly that
@pancake4691
@pancake4691 Год назад
fr lol
@bakre_dev8728
@bakre_dev8728 Год назад
@jeseviso-s2u
@jeseviso-s2u 2 года назад
Los Pollos Amigos
@blockbuster_7103
@blockbuster_7103 2 года назад
Use kotlin
@ЕвгенийКозлов-у4л
@ЕвгенийКозлов-у4л 2 года назад
whos deliting my comments?
@MuslimMan377
@MuslimMan377 2 года назад
Him : salam alaikom Me : subscribe, like
@beshbenesh1796
@beshbenesh1796 2 года назад
yes no more cats ands dogs..... :)
@abdullahdaoud
@abdullahdaoud 2 года назад
Thank you so match , this is very great 🤍
@valarchandran6581
@valarchandran6581 2 года назад
@amigoscode nice explanation
@redhotbits
@redhotbits Год назад
just dont use them
Далее
Learn SOLID Principles with CLEAN CODE Examples
28:35
Просмотров 274 тыс.
10 Most Common Java Developer Mistakes
16:13
Просмотров 108 тыс.
Abstract Classes vs Interfaces (Java)
9:43
Просмотров 208 тыс.
Abstract Class in Java and Usage in Selenium
21:14
Просмотров 27 тыс.
Learn Dependency Injection and Write Better Code
21:52
Просмотров 174 тыс.
The Flaws of Inheritance
10:01
Просмотров 954 тыс.
Abstract Class In Java Tutorial #79
8:55
Просмотров 543 тыс.
Java Streams Tutorial | 2020
19:13
Просмотров 262 тыс.
Interfaces vs Abstract Classes
14:43
Просмотров 15 тыс.
the right way to organise your code
17:33
Просмотров 199 тыс.