//****************************************** public class Main { public static void main(String[] args) { // abstract = abstract classes cannot be instantiated, but they can have a subclass // abstract methods are declared without an implementation //Vehicle vehicle = new Vehicle(); Car car = new Car(); car.go(); } } //****************************************** public abstract class Vehicle { abstract void go(); } //****************************************** public class Car extends Vehicle{ @Override void go() { System.out.println("The driver is driving the car"); } } //******************************************
@ericbiscayne6722 Жыл бұрын
You sound very nice and attractive
@thegreenroom58202 жыл бұрын
WTH... I have read full chapters on this topic and didn't come away with this clarity. You have earned a subscriber.
@Pzdrs3 жыл бұрын
such a godlike explanation what the heck
@kristijanlazarev10 ай бұрын
CRAZY
@SinghB42 жыл бұрын
Missed classes because I was sick and your videos helped me so much in so little time. The best 🙌🏼
@funkyliani Жыл бұрын
I started learning Java through an online course, which is terrible at explaining things, leaving me confused lot of the time. Then comes BRO, who explains everything so simply and elegantly that I have no problems understanding it! Thank you BRO!
@mohammadreza14145 ай бұрын
Your videos gives everyone a very clean start. This is great because we can easily build on that using other resources.
@laurahanna522810 ай бұрын
Honestly, your videos are saving me this semester. You explain it better than my professor, thank you for making content like this.
@ericbiscayne6722 Жыл бұрын
Bro; you have no idea how much you've helped me so far to learn Java. Any doubts I come here, looking for an example that you have,no doubt thank you, sincerely. - Never thought a bro' would save my ass this way. Love you and admire you.
@donuteater77747 ай бұрын
I love you. Someone who can actually explain things!!!
@juvenalbaera26413 жыл бұрын
I don't understand English a lot, but with this guy, I'm understanding 90%. Muito obrigado ✌️ From Mozambique🇲🇿
@shalomerror62362 жыл бұрын
Hey, Juvenal! How is your Java-learning going on?
@juvenalbaera26412 жыл бұрын
@@shalomerror6236 it's going well
@hero_bsb63142 жыл бұрын
méquié Juvenal ainda fazes Java?
@juvenalbaera26412 жыл бұрын
@@hero_bsb6314 parei há bom tempo.
@ericbiscayne6722 Жыл бұрын
Hi, do what I do. Goto settings and select playback speed. I lowered it to 70%,S, that way I can follow what he is saying one way or another. good luck
@pavelkvasnicka6856 Жыл бұрын
This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro
@NotYou-xk2bo2 жыл бұрын
Another great and easy to understand video
@deeplife9654 Жыл бұрын
Just made a comment for prayer to KZbin algorithm ❤❤❤❤❤
@revanthk613 жыл бұрын
Best video to learn about Abstract Classes.
@izlepox5234 Жыл бұрын
thank you bro, my professor didnt explain this well and now i totally get it
@the_yb72 жыл бұрын
This my 6th/7th video in this channel, Man!!!! I got to say this, yo explanations are spot on and explaining in a logical way make really sense on each of the topics. Good luck and keep doing
@nevenatutunovic65768 ай бұрын
WOW..now is so easy for understanding!Thanks
@viktoriyapetrova86928 ай бұрын
thank you so much for the explanation, you are the best!!! You did in 5 minutes what my professor was not able to do the whole semester.
@a1rman9064 ай бұрын
"and they might think ur crazy".. bro ur the goat of explaining java
@juanbaquero862811 ай бұрын
Cristal clear! Thanks bro!
@chiyuzhang3089 Жыл бұрын
simple and awesome like always
@wyattpearce2 ай бұрын
I feel like you are following the book "Java Programming" by Joyce Farrell
@dianamilenaarchilacordoba46323 ай бұрын
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
@hgatl4 жыл бұрын
awesome video
@Overlanding_AmericaАй бұрын
great explanation thanks. love coming to your channel before a new section in my Udemy course so i have a good high level understanding before getting into the complex stuff
@danny.30363 жыл бұрын
Thanks, Bro! ☕ You're awesome!
@GeoffreyofCastille3 жыл бұрын
Great explanation, very helpful!
@BereketBelete-o2d5 ай бұрын
Brilliant! Keep it up!
@a2011q3 жыл бұрын
thank you bro, I am using your videos to learn java, very helpfull to me, good luck, keep up the good work !!!
@jerryysen11 ай бұрын
the car dealership example
@Armadder Жыл бұрын
Thank you for this video, I'm just about done reading the pdf I have in my coding class because it just goes on; I've never been huge on reading instructions. This gets straight to the point and makes the purpose of it obvious.
@aiueo8962 Жыл бұрын
anjay, langsung paham gw, keren bang, lanjutkan kerjamu
@georgey0842 жыл бұрын
I have been avoiding any instance that would make me use abstract classes cos the articles I read before never explained it clearly but I think this is the safest way to me now. I have been creating classes and just making things simple by using access modifiers, but yeah, thumb up Bro.
@elionayzuridasilveira41407 ай бұрын
Thank you man for this new old tutorial
@yousifalisyed5504 Жыл бұрын
Thanks for the explanation
@sanskritigiri Жыл бұрын
This was a great example
@nouraldinurfan50244 ай бұрын
thanks for helping us.
@DiyakoAdnanAbdullahWahab10 ай бұрын
best channel on youtube.
@hachemhannechi64223 жыл бұрын
Good videos , very helpful , we need a mysql tutorial to complete the full stack dev
@PetiteKero Жыл бұрын
I LOVE these explanations, the example with the dealership and the vagueness was extraordinary. 💙 Just one thing that's still keeping me from fully diving into everything: I sometimes miss the practical use. Why would I wanna prevent somebody from instantiating the abstract class? Why do I need to send values to a constructor and not just use the Main class? Any idea how to untie this knot in my brain (which lets me think a miss the very basics of Java)?
@soumelee56612 жыл бұрын
i finally understand abstract class, like the "why?" of this topic
@augischadiegils.51094 жыл бұрын
Another awesome video thanks bro :)
@GamingWithMighty985 ай бұрын
Nice Bro
@jasonpoonia2 жыл бұрын
You are a legend!
@deez-48 Жыл бұрын
thanks that helped me remember the concept
@luisantonio7191 Жыл бұрын
Thanks for the class
@supersakib622 жыл бұрын
Thanks for clear cut explanation.
@Muhammadfaisal-kd9kx Жыл бұрын
easy to understand thankyou
@dllm3tommy741 Жыл бұрын
Thanks for the video
@Comedianalexj Жыл бұрын
Nice bro... this made it sooo simple to understand! Thx
@kemann38153 жыл бұрын
Extraordinary work
@Bastyanul2 жыл бұрын
Thanks for the video and the knowledge you offer!
@yonasfikadie5323 Жыл бұрын
nice ❤💛💚
@rafalgontarski32542 жыл бұрын
That's awesome
@jahed13112 жыл бұрын
youre just great .
@YouTube4u95 Жыл бұрын
Very helpful, thank you.
@Arryan.gh1 Жыл бұрын
Love you, from France
@nawfalnjm56993 жыл бұрын
great video , thank you !
@mohammadalaskari7002 жыл бұрын
This really helped me. Thank you.
@nycolleamaral58110 ай бұрын
thanks you, I am brasilian and dont understanding ingles very, but you tell so good!
@Gabriel-xq6tn8 ай бұрын
Good explanation. Do you need to have a regular method inside an abstract class since an abstract class cannot instantiate objects?
@arkamukhopadhyay21774 жыл бұрын
Sir, I have two questions: 1. Can an abstract class have a normal (non-abstract) method? 2. Can a normal class have an abstract function?
@BroCodez4 жыл бұрын
Hello Arka! Good questions 1. An abstract class will need static methods since we cannot create an instance of an abstract class 2. A normal class cannot have abstract methods
@arkamukhopadhyay21774 жыл бұрын
@@BroCodez Thanks!!! 👍
@waleedahmed3963 жыл бұрын
@@arkamukhopadhyay2177 abstract class can hove normal method
@michael_scarn_ Жыл бұрын
Thank you Bro, you're the best!
@tamekkaknuth96122 жыл бұрын
Nice job again!!
@sergeyb60714 жыл бұрын
very well explained!
@FarizDarari2 жыл бұрын
Many thanks! Stay healthy, stay happy, Bro Teacher!
@msmilky6130Ай бұрын
this has helped me
@Sin1kicune2 жыл бұрын
nice job bro
@ymmaaarrrr2 жыл бұрын
nice video
@lmao96198 ай бұрын
best person in the world
@TheEvertonDias Жыл бұрын
Thanks, Bro!
@ericamuhammad50822 жыл бұрын
Thank you!
@曾毓哲-b1t Жыл бұрын
Thank you very much!!
@jennethestrada2232 Жыл бұрын
great
@thomas_16112 жыл бұрын
Bro is the best
@miuwai62112 жыл бұрын
Clear explanation. Thank you Bro -:)
@jessepen2 Жыл бұрын
THANKS BRO!
@hawzhin0102 жыл бұрын
thanks for you bro❤
@Easy.educantionАй бұрын
Thanks sir
@developerjunior4463 жыл бұрын
Super
@kardrynka Жыл бұрын
Perfect
@huuloc87193 жыл бұрын
Nice.
@usfeed49024 жыл бұрын
great ! thanks !
@david_jn24 Жыл бұрын
number one
@xXMaDGaMeR2 жыл бұрын
love you bro
@The-eo4lj3 ай бұрын
Wait but what's the difference between this and just making the methods in the classes you need them in in the first places? If you just override an abstract(useless?) method
@curtking88033 жыл бұрын
good stuff every time you hit the nail on the head quickly and clearly. let me know when your bible is ready i need a copy... Bro Code Bible,... never leave the house without it
@BroCodez3 жыл бұрын
Thou shall not use many 'else if' statements
@yevgenomelchenko732 Жыл бұрын
Hey you many thanks to you!!!
@minhtetpaing16953 жыл бұрын
Thank you so much sir.
@rashmikakelum8803 Жыл бұрын
thank you bro
@huylee47217 ай бұрын
nice
@davidkuda70743 жыл бұрын
Nice bro, thanks!
@tamekkaknuth96122 жыл бұрын
thank you !!
@immortlreacts1740 Жыл бұрын
appreciate it!
@justinbanza47513 жыл бұрын
very useful
@romario927303 жыл бұрын
Thank you so much
@marbles5590 Жыл бұрын
Great video! For the ones out there who are quite confused with the given example, another similar code snippet is like this: //Vehicle(superclass) //Bike, Car, Boat (all are subclasses and uses the extends keyword) Vehicle a = new Car(); Vehicle b = new Bike(); Vehicle c = new Boat(); Vehicle[] test = {a, b, c}; This is much more understandable and less confusing for some. However, if there's a unique method present on one of those three subclasses above (for example, like void printCarModel() in the Car class only) that is NOT present in the Vehicle superclass, you would need to use the example code shown in the video. If we try to access the printCarModel() method: a.printCarModel(); It would result in an error since the type of 'a' is 'Vehicle' and not 'Car' (because we did Vehicle a = new Car(); and there's no such printCarModel() in Vehicle) Use: Car a = new Car(); instead to access that unique method.
@suhailraja77979 ай бұрын
You could also typecast the vehicle into a car to access the method I also have one question that I'm confused about abstract classes What's the point of them? In this video he said it's to add a further layer of security to prevent someone using too vague or broad of a class and trying to make an object out of that but can't you just solve that by not making that class at all Is it because we need the superclass because it makes writing subclasses quicker because we can just use the super keyword to access all the general shared information that the subclasses have with the superclass, that way it encapsulates code more or are there any other reasons