Object-Oriented Programming Java Tutorial (Java OOP) #71

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 508

  • @alexlorenlee
    @alexlorenlee  10 місяців тому +3

    If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h

  • @minhhuynh2646
    @minhhuynh2646 4 роки тому +484

    this is the most easy to understand tutorial that I have ever seen. Thank you. I am at a loss in class because I learn English as a second language so it is hard to understand different accents. u save my life

    • @I.V.C_
      @I.V.C_ 2 роки тому +1

      You made it so simple, understandable,useful
      Thank you!!

  • @linuxworld3686
    @linuxworld3686 4 роки тому +96

    The best video ever in the history of youtube.
    Public class youarethebest{
    public static void main(String [] args){
    System.out.println("you are the best UA-camr who explains java.")
    // Thank you very much I learned in 3 days what I could never learn in three month
    }
    }

    • @hyphen8d725
      @hyphen8d725 4 роки тому +47

      Error: Expected ';' in line 4. Use semicolons to end block statements.

    • @SwillMith16
      @SwillMith16 3 роки тому +7

      i feel like such a nerd for laughing at this hahaha

    • @Berzy.T
      @Berzy.T 2 роки тому +1

      :)

  • @devinwhite4244
    @devinwhite4244 4 роки тому +102

    Been out of school for 5 years, starting to take college classes now and I currently have a computer science class. Sometime it feels so overwhelming like learning a new language. Your channel helps me out a lot man!
    Just wanted to let you know i appreciate it!!

  • @b.m.1022
    @b.m.1022 2 роки тому +22

    It's whack that Alex can explain things 10X better than my profs. and is literally giving all this Information to us for free! thank you sir

    • @FirstLast-lw5wh
      @FirstLast-lw5wh Рік тому

      @Taishawn White I rather he take money from them than us😂

  • @EvolutionAlpha
    @EvolutionAlpha 3 роки тому +24

    This helped me so much. I have so much anxiety about my computer science degree. I often times stuggle to stay focused and many demonstrations are very abstract. This is exactly how my brain makes sense of things. THANK YOUUUU

  • @thecurlybrothers1244
    @thecurlybrothers1244 11 місяців тому +4

    This is genuinely the most understandable lesson I've ever taken in java. Been self studying it for a while now and dropped it because OOP wouldn't make sense no matter what website I used, this cleared up all my OOP confusion so much fr.

  • @alexzander7143
    @alexzander7143 3 роки тому +30

    dude you dont even know how helpful you have been to me watching your vids through out this covid session while taking school online , professors just over complicate things so much that i get lost and your vid is straight too the point and not boring makes it fun to learn

  • @samrathsinghsaini3706
    @samrathsinghsaini3706 3 роки тому +18

    This felt like my super smart friend explained something the teacher took months to come to. Good Work man.

  • @stevennguyen7
    @stevennguyen7 2 роки тому +13

    just wanted to let you know that I was scared of doing a class project because I was intimidated by OOP. But after watching this video, OOP in java seemed a lot more simple, so I was able to start and complete the project, which was making Wordle! Thanks a bunch, Alex. :D ur awesome!!!

  • @vishwa_tennyson
    @vishwa_tennyson Рік тому +3

    I have seen many programming tutorials, also enrolled in some paid courses but I never seen a tutorial like this. The best tutorial I had ever watched and have a 100% satisfaction of learning. Great video, Thank you.

  • @timaya6
    @timaya6 Рік тому +10

    Alex, I cannot thank you enough.
    You make everything sound so easy and fun. You're a wondeful Tutor.

  • @kunchikhs
    @kunchikhs Рік тому +2

    I'm a software developer and was looking for a video to help my teen understand OOP for his Java class. This is an excellent, straightforward explanation.

  • @kinam1913
    @kinam1913 3 роки тому +4

    i was really stressing all week over not understanding this because my professor throws around random terms that i don’t know understand. why can’t all professors just be like Alex Lee? thank you endlessly.

  • @gregoryyang8988
    @gregoryyang8988 5 років тому +160

    public class Something {
    public string notString = Good video, very bpic.;
    public static VOID main() {
    //TODO Auto-generated method stub
    System.out.println(notString);
    }
    }

  • @excellins
    @excellins Рік тому +1

    this is what we call a good teacher. tired of folks out there using unnecessary buzz words to teach, thanks man

  • @MisterWealth
    @MisterWealth 5 років тому +97

    One step closer to working on a video game! Let's do it Alex, one tutorial a week towards a workable amazing example of a fighting game!

    • @otpreet
      @otpreet 4 роки тому +1

      U made it?

    • @MisterWealth
      @MisterWealth 4 роки тому +6

      @@otpreet Nope still at the basics.

    • @mukulsharma5738
      @mukulsharma5738 4 роки тому +3

      @@MisterWealth Keep At it.. You can do this !! Good luck

    • @MisterWealth
      @MisterWealth 4 роки тому +1

      @@mukulsharma5738 trying

    • @MisterWealth
      @MisterWealth 3 роки тому +1

      @@abhayraj6390 Would love help!

  • @mandalou15
    @mandalou15 3 роки тому +8

    Your videos have taught me more than the classes I'm taking at a state university! You've helped so much.

  • @taur6115
    @taur6115 4 роки тому +4

    Probably the best video explaining OOP I've seen. Well Done and Thank You. I just started learning JAVA so this is perfect...and yes I've subscribed.

  • @mariacunha8508
    @mariacunha8508 2 роки тому +4

    I’m shocked and sooo grateful for this video! You have a teaching gift! Thank you so much for explaining what my prof couldn’t in a whole semester 😭🙏🏻

  • @jeromefacelo8334
    @jeromefacelo8334 3 роки тому

    I've seen lot of tutor vids explaining what is OOP, and yet this is or the only tutor vid that help me understand it easily. Thanks men

  • @ruleless2123
    @ruleless2123 11 місяців тому +1

    THIS WAS THE BEST VIDEO I WATCHED!!! you gave real world examples which i dont think alot of other youtubers watch. if you dont undestand it simply you dont get it. you get it man thankS!!!!

  • @BlaqueRaven
    @BlaqueRaven 4 роки тому +3

    Once this semester is over, I will watch all your Java videos.
    Thank you so much for your tutorials!

  • @j.r8150
    @j.r8150 3 роки тому +3

    OMG I finally understand it. I am completely new to all of this and the Amazon/headphones example finally made sense to me.

  • @igorvasic9545
    @igorvasic9545 4 роки тому +1

    It took first 5 min to understand what I've been trying to figure out entire day , thanks a lot for making this video series.

  • @sharmainefanged8089
    @sharmainefanged8089 4 роки тому +1

    It took me months trying to understand OOP, and thank goodness I found your youtube channel. You made it easy to understand. Thank you very much. Hoping that you continue creating videos with contents like this :) God Bless you for sharing your knowledge and experiences :D

  • @benlu705
    @benlu705 Місяць тому

    Thank you so much. OOP sounded so much harder and complicated than it actually is. Thanks for simplifying it!

  • @morenomt27
    @morenomt27 3 роки тому

    wow!!! OOP in the most simplified form, in 14 mins, I was able to understand what it is and now would be able to apply at work.. I do on and off coding and i tend to forget what i am coding and why am I doing things.. thank you so much!

  • @zb2747
    @zb2747 2 роки тому +3

    Once again another great no bs, simple, straight to the point, and intuitive explanation of the core/main concept of OOP with some implementation. Thank you bro!

  • @sonamrawat6808
    @sonamrawat6808 3 роки тому +2

    i have been taking my class for java since two weeks, and it was really hard but after finding this channel trust me i understanding better thanks a lot alex 💙

  • @mannycalavera121
    @mannycalavera121 2 роки тому +1

    This is the clearest example I've seen. I've been through a couple python courses and now head first java (which Is fantastic) but your example really distilled it the best.

  • @SwillMith16
    @SwillMith16 3 роки тому

    all the other tutorials ive ever watched on programming skip so many things and never fully explain what each command does but bro all your tutorials are unbelievably easy to understand thank you so much!!!!!

  • @rachgilly9156
    @rachgilly9156 4 роки тому +6

    you're really out here doing the lords work thank you so much

  • @is4554
    @is4554 5 років тому +10

    This is what I was waiting for :) Thanks Alex. Please keep it up man.

    • @alexlorenlee
      @alexlorenlee  5 років тому +4

      Haha awesome, glad to hear it!

  • @youthought878
    @youthought878 2 роки тому +2

    Going into an object oriented programming class next semester and was just looking for a foundation before that. This helped a ton, and if it’s all this simple and easy I will pass with flying colors. Great video sir

  • @bennycienfuegos2850
    @bennycienfuegos2850 Рік тому +3

    This actually helped a lot. It's pretty frustrating that the courses i'm taking don't just lead with this. So... thanks!

  • @diclebahceli622
    @diclebahceli622 4 роки тому +1

    Best video I've ever seen. I was really confused before I watched this video. But I can understand the logic of all of them now. Thank you so much.

  • @inokemow5290
    @inokemow5290 Рік тому +1

    Thank you Alex. I'm taking up Computer programming specifically Java. It's super hard for me. You have been of great help to me.

  • @ashrafulalim1272
    @ashrafulalim1272 3 роки тому

    I have tried a whole day to understand this OOP. Now I have found a perfect tutorial. Thank you, Lee.

  • @hilmanhakimi8798
    @hilmanhakimi8798 2 роки тому

    bro I struggled on this for weeks and from your videos I understand lots better thank youu have great day

  • @yodaheawet.k9125
    @yodaheawet.k9125 2 роки тому

    hi i am 12 years old and most of the java videos that i have watched i did not understand except
    your thank u so much ! all our videos helps me .

  • @h-ka-forum.online2763
    @h-ka-forum.online2763 3 роки тому +1

    You got me to watch your videos even after I am done with studying. The point of what i am saying is, I am having fun! Thanks man

  • @merouamesmous3369
    @merouamesmous3369 3 роки тому

    I've been struggling for 2months to understand the OOP and you just made it easy in 10min so thank you alot

  • @rishianand8102
    @rishianand8102 3 роки тому +1

    dude, you are a lifesaver. Thank you so much man! You have no idea what this means to me. Hella relieved that I'm finally understanding java.

  • @bellaseasons9835
    @bellaseasons9835 2 роки тому

    the simplest and easiest oop concept video I have ever watched!! thanks for all the efforts!! love your videos

  • @ilejovcevski79
    @ilejovcevski79 4 роки тому +7

    Classes and Objects aren't really the same thing. Classes are the recipes upon which objects are build on. You can have multiple objects that belong to the same class, but not the other way around.

  • @antektheengineer82
    @antektheengineer82 Рік тому

    You ask if you explained that well - I'm sure there are a thousand ways to explain this wrong, and I bet I could hear them from my school or academic teachers, but you explained this the best way I could think of. I understood everything from this video and now I have a whole coherent chunk of knowledge. My perception fully approves your methods 👍

  • @Jezeniah127
    @Jezeniah127 3 роки тому +1

    You are awesome!!! My programming instructor is terrible and pretty much non existent due to it being an online course. You are my go to and save me every time. You should definitely be teaching at a university!!!

  • @1212332090
    @1212332090 2 роки тому

    best video for understanding the basic of what oop is! tnx so much!! i was struggling with how to explain it..you mad it so simple! thank you

  • @mohammadyousuf1567
    @mohammadyousuf1567 Рік тому

    Really liked the way you explained OOPS. It just sits in my mind

  • @davidschopchen9695
    @davidschopchen9695 Рік тому

    That is the best video I have ever seen about objects programming. With simple examples you made it to explain so easy. Thank you.

  • @Cavsteek
    @Cavsteek Рік тому

    This really explained it in the easiest way possible, thank you!!

  • @jackgately7992
    @jackgately7992 Рік тому +1

    You are so much better than all my teachers THANK YOU SO MUCH!

  • @richardverjel
    @richardverjel 2 роки тому

    great example with the headphones!. it was an excellent way to make it easy to undertand. thanks!

  • @arteria6536
    @arteria6536 2 роки тому

    I learned the basic concept in less than 15 minutes and my teacher spent almost 2 weeks to explain about it TT
    Thank you so much, it really helped me out!

  • @paolocallegaro4867
    @paolocallegaro4867 3 роки тому +1

    Thank you very much. This is the best oop Java tutorial i've seen becase shows clearly how to use Java objects.

  • @shady.gg1234
    @shady.gg1234 3 роки тому +2

    No words to say , Love this , I learned so many things from you man!

  • @coding01coding01
    @coding01coding01 Рік тому +1

    Awesome video! Thank you very much for making video like this!

  • @deltanetrunner4146
    @deltanetrunner4146 5 років тому +1

    Alex thank you. Firstly for sitting in the middle of the summer to prepare these amazing tutorials for us. Second for the casual but scientific and earthly way that you are explaining everything. Tomorrow I have my exams at the univerity for Object Oriented Programming, I was nearly frustrated until I came across your channel. Even If I don't pass tomorrow, I know that during the semester I will be watching your videos so that I'll be ready for January.. Keep it up my friend, great job!

  • @aliada8738
    @aliada8738 11 місяців тому

    "I want you to forget everything you know." I love that line because I don't know anything in the first place.

  • @howangaming2000
    @howangaming2000 2 роки тому +1

    I really do love your tutorials, it's easy to understand and always be on point

  • @rulydesigns
    @rulydesigns 6 місяців тому

    You did totally well Alex. Thanks for this simple explanation.

  • @bomboclaut9
    @bomboclaut9 Рік тому

    thank you so muchh bro......your explanation far more understandable than my 2 hour lecture in class.

  • @petesakecs
    @petesakecs Рік тому

    Thank you bro you're a life saver I'm taking exam today for my job and I get it more than any car sample

  • @shivanshshekherojha2599
    @shivanshshekherojha2599 3 роки тому

    Bro your video is just amazing to build up a base of any topic to shine in class

  • @worldtvtv
    @worldtvtv 3 роки тому

    You do this thing, where you make me feel better about myself once i've finished watching your videos...Thanks Alex!

  • @jabss7847
    @jabss7847 2 роки тому

    Wow thank you so much !! I saw videos and read the learning materials in my class abt OOP but I'm still not clear with it. I watched your video once and just get it. Make total sense and this videos wraps up all the things that I've learned abt OOP in Java. Just like that it connects everything. Thank youu ! No need to complicate things when you can simplify it down to a point. Subscribed :)

  • @namratapai4650
    @namratapai4650 3 роки тому +3

    You make coding so easy. Thank you Alex:)

  • @anaums413
    @anaums413 Рік тому

    thank you so much my lecturer teaches like we've been doing this for 10 years

  • @libertydixon1542
    @libertydixon1542 Рік тому

    and i- OOP! This is the best explanation of OOP ive ever heard. Thank you so much!!!!!!!!!!

  • @jayveedelacruz755
    @jayveedelacruz755 3 роки тому +1

    You explain OOP clearly, but you should also include why you put static or atleast link another tutorial why use static either way a VERY CONCISE tutorial!

  • @carlvincentbermudo4424
    @carlvincentbermudo4424 3 роки тому

    Best tutorial in youtube. THANK YOU, MAN!

  • @jasonking1284
    @jasonking1284 Рік тому

    Damn... your presentation is crystal clear. Large text on white background. So many other idiotitic videos present with very, very poor off white color text on a black background and to make matters much, much worse, it's like the text is directly off a 4K screen and you would need a magnifying glass to see it....
    Your series is excellent....

  • @connorkuczynski1016
    @connorkuczynski1016 4 роки тому +41

    This is a decent video however it fails to differentiate class vs object. Classes are not pretty much the same as objects. The click and unclick methods are static, meaning they belong to the class not a specific pen instance. These methods would be called using Pen.click() as they are static methods. The problem with this pen class is that all pen objects will all be identical so you can only model one specific pen and that isn't really useful when we want generality and the ability to create several different types of pens.
    There are times when using static methods does make sense. For instance, let's use the class Math as an example. If we want to take the variable a and raise it to the power b, we could use the method Math.pow(a,b). In this case, the math class calls the static method pow and returns a^b. It does not make sense to create a math object.
    A better way to create a Pen class would be assigning values to the instance variables color, point, and type using a constructor. Using a constructor we can create different types of pens and each pen could be clicked or unclicked.
    Another small note, in general, instance variables should not be accessed directly from the main method as that breaks encapsulation. p.color, p.point, p.point should be accessed using a getter.
    If anybody has any questions, feel free to ask and I'll try to answer.

    • @giridharg104
      @giridharg104 3 роки тому +1

      Thanks for the clarity. I'm still a beginner so I didn't get what you said in last paragraph.

    • @Mauro0
      @Mauro0 3 роки тому +13

      @@giridharg104 he said if you have a question just ask. He will reply to you

    • @winny8139
      @winny8139 3 роки тому

      @@Mauro0 ................ :D

    • @connorkuczynski1016
      @connorkuczynski1016 3 роки тому +22

      @@giridharg104 Sorry I didn't get back to you sooner.
      In the last paragraph, I'm talking about encapsulation. So ill use an analogy to try to explain what that is. Imagine your controlling a car. You have the steering wheel, brake pedal, and gas pedal. You also have lots of gears, the engine, and lots of behind the scenes stuff. Now if we are designing a car, we don't want to give the driver direct access to how much gas is put in the engine or the voltage of the spark plug. This is stuff you want to hide away from the user. Instead you give "methods" like the steering wheel and gas pedal that perform certain functionality. You are given access to the parts of the car that matter to the user.
      Imagine you gave the user the ability to directly change how much gas you put in the engine when it runs. The user could break the car as the engine catches on fire. We want to protect the user so we hide away this by encapsulating it.
      When you create objects in programming, you only want to give the user access to information that they need without the ability of breaking stuff. p.color and p.point give you direct access to fields inside the object. You can change those values directly which as explained before can be undesirable. What a "getter" does is that it gives you the value of for example p.point. However you aren't able to directly change p.point. I hope this helps helps.
      Google "encapsulation" and "programming from an interface" if you want to know more.

    • @giridharg104
      @giridharg104 3 роки тому

      @@connorkuczynski1016 thanks man I get it now and I'm gonna look it up

  • @duongvuong8514
    @duongvuong8514 2 роки тому +1

    OMG, I'd kill for you to be my mentor. Just finished an OO summer class yesterday, got a B since both my major exam is 50 due to not utilizing OOP. My favorite part is, my prof explaination didn't even come close to yours and I didn't understand a dime the whole class even when rewatching it for 5 times, but I got it watching you in first try lol

  • @Franshpsv
    @Franshpsv 3 роки тому

    The way you explain this is soo very clear and easy

  • @mngf749
    @mngf749 4 роки тому

    It was confusing at first but now eveything is so much clear

  • @kopilkaiser8991
    @kopilkaiser8991 Рік тому

    Nice video. You have taught it in the right way. Easy to understand. This will be a good source for the beginners.

  • @readysetgo4468
    @readysetgo4468 Рік тому

    bro thank you so much! with your vids your helping me survive through college

  • @agastya6799
    @agastya6799 3 роки тому +1

    best explaination video on UA-cam

  • @mcfirstempire
    @mcfirstempire Рік тому

    Thank you so much. You are the actual best. My university teachers give us links to your channel. That is how clear and efficient you are.

  • @Muhammed.Yaseen
    @Muhammed.Yaseen 2 роки тому

    Hey! Your channel is just awesome! You explain stuff in a very fun simple, kinda fun way, so it’s enjoyable.

  • @Cynpie_
    @Cynpie_ 11 місяців тому

    Thank you sm bro, really helped me understand OOP much better with a clear unserstanding.

  • @jofrew2224
    @jofrew2224 2 роки тому

    you're the GOAT of tutorials

  • @neocephalon
    @neocephalon 2 роки тому +1

    You're a great teacher, simple and to the point!

  • @jyotishmanparasar9552
    @jyotishmanparasar9552 2 роки тому

    Brother thank you for making it so easy to understand. Keep up your good work. Once again Thank you so much..

  • @MrWitwortel
    @MrWitwortel 5 років тому +1

    Love your videos and explanation style man!

  • @ahmetalperenyildirim6184
    @ahmetalperenyildirim6184 Рік тому

    Awesome tutorial for OOP, loved your channel thank you for sharing Alex!! Keep up good work!

  • @usermonaco5889
    @usermonaco5889 2 роки тому

    Its so easy to understand it. Thanku very much. I hope you make more videos about OOP

  • @anastaciakonstantynova3047
    @anastaciakonstantynova3047 3 роки тому

    thank you sooooooooo much for making java tutorials. They are amazing and easy to understand. it helps a lot in studying for my exam and I couldn't be grateful enough☺️

  • @chellodise
    @chellodise 5 років тому +2

    I love the analogy

  • @stephenmwega4571
    @stephenmwega4571 2 роки тому

    Clear presentation of the concept of objects in Java programming. You are a good teacher 👏👏

  • @user-kn6vw4sr2r
    @user-kn6vw4sr2r 3 роки тому +1

    So for every class, we should create another file?

  • @Tr4vx
    @Tr4vx 2 роки тому

    Bro I could never thank you enough like seriously thank you, u are the best.

  • @zachall9699
    @zachall9699 4 роки тому

    i have been having a hard time learning this. this video help so much and gave me a new confidence

  • @davenport8
    @davenport8 10 місяців тому +1

    So helpful! Thanks Alex

  • @saiusmc
    @saiusmc Рік тому

    Thank you for making this video. It really help with the understanding.

  • @euraquelarr
    @euraquelarr 2 роки тому

    Thank you sooooo much for making this so easy to understand. I was having a hard time with OOP but now it seems easier. Thank you very much.

  • @jorgerivera9175
    @jorgerivera9175 Рік тому

    10/10 best tutorial literally ever

  • @dezuhray13
    @dezuhray13 5 років тому +2

    I love this video! Very helpful! I was wondering if you could show how to use OOP for classes in the Java API like JButton, JFrame, etc. ?