//********************************************** public class Main { public static void main(String[] args) { Fish fish = new Fish(); fish.hunt(); fish.flee(); } } //********************************************** public interface Prey { void flee(); } //********************************************** public interface Predator { void hunt(); } //********************************************** public class Rabbit implements Prey{ @Override public void flee() { System.out.println("*The rabbit is fleeing*"); } } //********************************************** public class Hawk implements Predator{ @Override public void hunt() { System.out.println("*The hawk is hunting*"); } } //********************************************** public class Fish implements Prey,Predator{ @Override public void hunt() { System.out.println("*The fish is hunting*"); } @Override public void flee() { System.out.println("*The fish is fleeing*"); } } //**********************************************
@janmail80184 жыл бұрын
Every time you have not understood something at university, our bro is there for us!
@agrajyadav2951 Жыл бұрын
u study this in uni, this is taught in high school here
@kuber5241 Жыл бұрын
@@agrajyadav2951damn bro, but atleast your getting early exposure in this programing language
@bunjrsima4151 Жыл бұрын
Indeed!
@Gupatik9 ай бұрын
@@agrajyadav2951in high school I studied c language and c++ and now this at uni. but where are you living tho??
@Sofia-rg3er8 ай бұрын
agree
@osiaosienka71833 жыл бұрын
i spent last few hours trying to understand what interface is an it took you less than 8 mins to explain it perfectly.. you're awesome
@retardbuster1498Ай бұрын
Maybe bcs there's not much point in trying to understand what the interface is as a beginner, just have to know how it is used
@youvegotmail93852 жыл бұрын
I absolutely love this guy's teaching style. I especially love that he has pseudo-code up so we know exactly what we are working with.
@iwearcute10 ай бұрын
Very thorough and professional! This guy created the classes and interfaces thren wrote the code right there, whereass our Uni professor copies the code from existing projects and files and pastes it without going through all of the steps with explainations.
@faris.m172 жыл бұрын
For anyone without a Java IDE, to create a new interface, just make a new java file and put 'public interface ' and its the same thing.
@Reymax1648 ай бұрын
Works even in the same java file… without the "public" …because you do that so that other .java files can access it.
@hgatl4 жыл бұрын
It is really understandable and he is telling clearly ,thank you bro
@thegreenroom58202 жыл бұрын
Nice, understanding the relationship between predator and prey brought another layer of clarity. I have been existing without interfaces.
@colesimpson81882 ай бұрын
My brain is fried. I will likely never hear the word Hawk the same again
@tejirie.9861Ай бұрын
You're hearing weird things when you hear hawk too, eh?
@mahitharachchi4116Ай бұрын
same here lol
@Tarantula.8eyes26 күн бұрын
tuah!
@bestielwuca467719 күн бұрын
@@tejirie.9861 say that again
@Overseer0118 күн бұрын
@@bestielwuca4677 hawk.tuah()
@omardumet1204 жыл бұрын
THE BEST IN KZbin
@BroCodez4 жыл бұрын
thanks Omar! I'll try my best to have this channel live up to that title
@zc75043 жыл бұрын
this channel is so underrated
@bratan_rust2 жыл бұрын
I am from Germany but it is the first clear english description which I understand and it is better as the other german description about Interfaces .. thumbs up for you and I will check your other videos, if I will learn more about Java .. thank you
@nahimgood1833 Жыл бұрын
Big thanks, teacher took 2 hours to try to explain this but you made it understandable.
@PhillyGodschild Жыл бұрын
Thanks, for this video it has helped me to understand more about interfaces and also learn about what I missed in class today 😊🥰
@chilledxaura9 ай бұрын
So much simpler to understand than whatever I was learning. And I can already see how this is useful in more advanced applications
@peiko97672 жыл бұрын
This is really helpful , thank you for helping me to understand JAVA better ^^ Keep up the great work!!
@jilllin97762 жыл бұрын
Every time when I am stuck in JAVA, Bro code always saves me from there. Thank you, Bro!!
@francischileshe86152 ай бұрын
The hawk is tuahing
@ramziosta3 жыл бұрын
Bro, you got the best tutorials! hopefully to see an AWS tutorial
@cdjosh35684 жыл бұрын
Good Vid Bro, I have a question. What would you recommend I do so that I really internalize all these vids and don't forget the material I've learned? Also my opinion: I fee like the interface is only useful if you need to inherit multiple things.
@BroCodez4 жыл бұрын
good question! Try and code something you might find useful for yourself to reinforce the concepts. For example, I play a lot of D&D so I have dice roller programs, character creators, and map builders that I make for practice
@Garrison862 жыл бұрын
Thanks for the explanation 👍super easy to understand
@tenhociencia9466Ай бұрын
Your videos are awesome, I understand you better than numerous classes in my college
@StevenRafael2682 ай бұрын
this actually helped me out so much, thank you! i tried learning these concepts in my class but it got all jumbled and buried under all this jargen, but this is so simple and easy to understand, thanks! :)
@wyattpearceАй бұрын
Such a great video man, perfectly simple thanks
@rishiandrian-roblox36014 ай бұрын
he is a really good teacher, i appreciate your effort bro.
@anjamisimovic92143 жыл бұрын
this is so loud and clear! tnx
@Andboldquates2 жыл бұрын
simple, clean, understandable, thanks thumbs up
@helenaa13049 ай бұрын
been using your videos to review for my midterm, you've been a big help this semester. thanks, bro :))
@dianamilenaarchilacordoba46322 ай бұрын
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
@marci87469 ай бұрын
Is there an actual reason to use interfaces other than declaring what a class must do? I just feel like it has no other reasons because you only inherant the function name but still have to declare what it does for each individual class.
@alirezatahmasebi2920 Жыл бұрын
Bro! That’s amazing! Keep it up
@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
@hesham47442 жыл бұрын
i love the way you simplify subjects ,keep it up bro
@abdimegersa77802 жыл бұрын
You're the best
@albertoam2 Жыл бұрын
Thanks, I always look at your videos, they are very easy to understand
@Varshith242 ай бұрын
The Hawk is tuahing
@EdgeLordOmen4 ай бұрын
Hawk.Tuah
@arthur_p_dent42823 жыл бұрын
Taking Tim Buchalka’s Udemy course. And as much as I am loving it, if there’s ever a time I need something clarified, my bro’s always got my back.
@prxnv Жыл бұрын
yeah tim got lazy section 10 to 12 it seems, didnt rly explain stuff that well. other than that, excellent course
@曾毓哲-b1t Жыл бұрын
Thank you very much !
@abdulsamadh63182 жыл бұрын
Lovely explanation, straight to the point!
@sharalnaja94374 жыл бұрын
please keep up the good work i literally straight coming to ur videos for my IT education next time, could u do more of a project tutorial, maybe making a simple game something? that would be great also thank u very much!
@BroCodez4 жыл бұрын
thanks Shar! I have a few games near the end of the full play list if you're interested: kzbin.info/www/bejne/d2TNdmN9fdWFn9U
@immortlreacts1740 Жыл бұрын
best explanation i've heard... saved me
@kim11747 ай бұрын
That was Awesome lecture! thx Bro!😄
@hytalefanboi74713 жыл бұрын
Good video
@ניסיםאלפקס2 жыл бұрын
תודה לך יהודי יקר וכשר
@minhtetpaing16953 жыл бұрын
Thank you so much sir.
@阿毛-x7k Жыл бұрын
Thank you for your clear explaination!
@amircc72972 жыл бұрын
Very informative, thanks.
@anmjubaer2 жыл бұрын
Wow. Easy to follow and understandable. Thanks.
@r4nd0m254 ай бұрын
you are awesome dude
@LuizGuilherme-ru6nt26 күн бұрын
Pretty good video Bro
@_Anna_Nass_3 жыл бұрын
I’ve officially nominated you as my Java professor
@JamesBondRJ7072 жыл бұрын
Clear and crisp👍👍👍
@evryon18103 жыл бұрын
This is AWESOME, ty youre literally teaching me everything
@alcachofa23946 ай бұрын
thanks for the explanation bro
@dunnydunn4585 ай бұрын
Thank you for the tutorial! Is the "@Override" necessary? What does it do?
@shanibar68862 ай бұрын
Great video! thanks!
@unalysuf Жыл бұрын
Thank you so much for your effort
@NeuronCode Жыл бұрын
I'm from Brazil, thanks for the video bro! ❤
@jcs09848 ай бұрын
I'm literally in a Java 2 class and they explained interfaces like **** and you just explained it so easy, idk wtf I go to class for
@Felix_181121 күн бұрын
Thank you, your saving my life
@adanskiesabaria6 ай бұрын
Ilove Your Tutorial
@rohanl.r767311 ай бұрын
You are the universal java bro
@climborre72163 жыл бұрын
realy good video thanks
@SpunkyGo0se11 ай бұрын
It's crazy how teachers can be so bad at explaining simple, straightforward concepts like this.
@damithajayawardana75683 жыл бұрын
Yeah bro that's awesome thanks
@ibrahimylmaz83782 жыл бұрын
thanks bro
@leilakardan5503 Жыл бұрын
Tanks it was perfect
@RSKEDITS2 жыл бұрын
great explanation
@emilakhmedov25532 жыл бұрын
East or West Bro is the best!
@abdialemu8391 Жыл бұрын
great!!!
@zlh04 ай бұрын
love ur shit ur a life saver fr
@JayathuShehan Жыл бұрын
You is the real bro❤❤
@victorejiofor81152 жыл бұрын
Thanks so much, Bro Code you made this easy to understand. Now I understand what interfaces are.
@אביבמהרשק5 ай бұрын
Thank you really helped
@IDK-kv8ob Жыл бұрын
Bro these videos have helped me immensely. This sh!t is so overwhelming.
@nikitamarkovski71213 жыл бұрын
Thanks, much clearer than on previous guy's channel lol
@pa-3053 жыл бұрын
best brooo
@noelchacko3 жыл бұрын
Beautiful video
@yevgenomelchenko732 Жыл бұрын
Thanks, very helpfull!
@samueleambrosetti405Ай бұрын
Thx, that was very clear!
@wallstreetbets77412 жыл бұрын
Cool man but I need rewatch it later
@rachpalsingh34982 жыл бұрын
crisp and clear. Thanks.
@aliak29872 жыл бұрын
You are amazing bro ❤
@kippenvogelchen97174 жыл бұрын
Thanks! Very good explained!
@rinadem5219 Жыл бұрын
super nice thanks
@leruleru87232 жыл бұрын
you're a LIFESAVER bro
@leonelenriquecontreras78602 жыл бұрын
Great video! thanks for the help bro! keep up the good work :)
@mohamedelfadli3125 Жыл бұрын
Totaly understood.
@Raphael-en6db17 күн бұрын
public class Hawk implements Tuah{ };
@Aurora-bv1ys14 күн бұрын
nononononono get it away from me
@Raphael-en6db14 күн бұрын
@@Aurora-bv1ys public interface Tuah{ public void SpitOnThatThang(); }
@huuloc87193 жыл бұрын
Nice.
@UtkarshKulkarni-v5o Жыл бұрын
Here, I become a Fellow Bro!
@_Anna_Nass_3 жыл бұрын
I have a question….it seems all of these could be done with abstract classes so why have interfaces too? Or am I missing something?
@hoangviet9787 Жыл бұрын
thank you so much bro code
@juanestebanparraparra63022 жыл бұрын
Thanks for your tutorials bro!
@reparatiicalculatoare5022 жыл бұрын
Genial!
@alexshepel55994 жыл бұрын
Awesome, bro!
@anupamsinha74303 жыл бұрын
Bro Code, thank you so much for this. When possible, can you make a 'Design Pattern' playlist please?