Java Constructor Tutorial - How To Use A Constructor in Java #74

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ • 512

  • @alexlorenlee
    @alexlorenlee  Рік тому +6

    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

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

      Awesome video, Alex. Thank you!
      Please what is the title of the background song in the beginning of the video?

  • @Randomlolstudios
    @Randomlolstudios 5 років тому +471

    I think I learned more about constructors in this tutorial than the last few weeks of my cs course in college, thank you for making it.

    • @Dennou85
      @Dennou85 5 років тому +6

      I have to agree, I felt exactly the same way.

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

      Ditto

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

      I disagree, this is completely WRONG. EVERYTHING is fucking STATIC.... this has nothing to do with objects or constructors.. the constructor in this video is completely unneccesary. He didn't mention the "this" keyword and didn't even manage to encapsulate the class. Yeah you may think you understand this. Because it's completely wrong. If you use constructors and classes like this then enjoy your F in your college cs course.

  • @suyogb7325
    @suyogb7325 4 роки тому +200

    4 java books and multiple online courses on java, yet whenever I have a java doubt I re-watch your video. Thank You.

  • @VivianHuangSnowy
    @VivianHuangSnowy 5 років тому +726

    Your way of teaching is so stress-relieving and easy to understand :') Thank you so much

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

      Big facts 🔥

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

      Yeah, that's true

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

      Yeah when I see his tutorials it seems like a friend is teaching to me which helps me to understand the topics in better and easy way...

    • @iliasi.4004
      @iliasi.4004 4 роки тому

      not when u put it on double-speed

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

      Bruh did you even subscribe

  • @jordanbrown2173
    @jordanbrown2173 3 роки тому +38

    Honestly might cry, I've been completely lost in this course over the past few weeks and finally am starting to understand it thanks to these videos. Thank you

  • @TheStewie96
    @TheStewie96 4 роки тому +13

    If my prof would explain it like you do, my life would be way more easy and I wouldnt waste so much time. Im so glad Ive found your channel. Love you

  • @tressaortiz2078
    @tressaortiz2078 3 роки тому +15

    I always read my notes, read the book, then I go on UA-cam and type in the subject + "Alex Lee". So thankful for the way you explain things that professors and books tend to miss the mark on

  • @AN-nk5yl
    @AN-nk5yl 4 роки тому +52

    Univeristies are missing out by not having you as a professor.

  • @cosminionut5521
    @cosminionut5521 5 років тому +114

    Hello! I recently discovered you but it seems pretty straight forward and to the point the way you teach. Hope you won't stop doing tutorials because for small students who struggle to learn extra stuff beside school is really helpfull.

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

    Great tutorial! In 15 minutes I learnt more than what I did in 150 minutes in university.

  • @13guile
    @13guile 4 роки тому +23

    3:10 you can just type "sout" then press tab. You're welcome guys

    • @13guile
      @13guile 4 роки тому +4

      that hotkey is for NetBeans IDE, im sorry

    • @M.RR.M.888
      @M.RR.M.888 4 роки тому +2

      Thank you!! it worked with my NetBeans IDE.

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

      in eclipse: type "sout" then press ctrl + space

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

      eclipse : you can try "sysout" then press (ctrl+space).

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

    your positive and encouraging way of explaining things is a relief from the monotonous and depressing type of education I receive at university. Thanks alot!

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

    Man, I can't image I am learning 2 hours lectures in 10 minutes. WOW keep the good work.

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

    My instructor chose to use your videos for our class, and I see why, this was so easy to follow, thank you so much!!

  • @danilane9655
    @danilane9655 5 років тому +3

    One of the best ways to see if you understand something is to see if you can teach it to someone else, and I must say, the way you explain things so great! You have such a good way of breaking things down and showing how each piece works together! I wish i had known about your channel when I was getting my certificate for full stack java developer, it would have helped a lot!

  • @AbhinavKumar-dr4ef
    @AbhinavKumar-dr4ef 2 роки тому +4

    You teach from the basics and how to think like a beginner. Awesome. Thank you.

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

    Every time that I don't understand any tutorial from the web, I always go to this channel and everything seems easy to understand now. Thank you!

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

    You should be proud man, I watched about 30 different videos on this, and this video is what finally made me understand 😂.

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

    I've been a musician for 30+ years and I recently decided to make a switch to something different that will still give me an opportunity to be creative but make WAY MORE money! I enrolled in a local college to study Web Development & my Java professor talks to us as if we already know this stuff. So I enrolled in a code camp (Code Academy) to help me get caught up on all the stuff he thinks we already know.. lol.. I've been looking everywhere I can to get help. Java isn't too difficult, it's just a lot to take in all at once. Anyway, I said all of that to say that I really like your teaching style. It was easy to follow along with you. Thanks a lot!

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

    Literally better than my lessons in college. Bravo! Can't thank you enough!

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

    Brilliant, this totally made more sense than 2 chapters and 2 lectures I've taken.

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

    Constructor basically creates an object - That line took off all the confusion. Thanks Alex.

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

    I have strated to learn Java and i have my first test on the 27th of octobre. I always watch your videos to really understand what i have to do. Thank you really much from the Netherlands!!

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

    My lecturer took 4hours to explain this but you made me understand this completely in 12mins..

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

    I love the way you explain each concepts with the recap at the end. Your videos is more helpful in my study in Java programming.

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

    I love how you walk through an example of each concept and not just spit definitions at us. Appreciate you posting these videos, makes learning java and coding much easier and less stressful.

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

    this guy is easily becoming my favorite UA-camr

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

    My teacher keeps rambling about the topic that I end up losing interest and end up getting confused. I watch you teaching for 12 minutes and I understand

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

    Most heroes where capes all you do is stand behind a camera and make life easier ❤️you're a hero

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

    I discovered Alex, a few weeks ago. Oh boy, you do know how to explain! Loved the content, definitely not the regular teacher 😀 Thanks, thanks!

  • @BigMon.BigSteppa
    @BigMon.BigSteppa Рік тому

    You actually just saved my grade, love the way you teach!

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

    This Java Tutorial is easy to understand than other tutorials in yt haha. Thank you so much!

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

    THANK YOU! This really answered a lot of questions for me.

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

    I love the way you teach java concepts and mix them with practical coding, it is more fun! keep up great work, bro!

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

    I've been stuck on this for the past week in class! thank you so much!

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

    thank you this helped with my exam in java for 1 semester of computer science

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

    I like how you explained the concepts without using all the Java terms that I heard in other tutorials. Like how you said that a constructor creates objects. Or that a constructor is a method. That stuff is easy for me to comprehend.

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

    I was struggling with understanding Constructors until I watched this video :) , Thanks a lot for your explanation :)

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

    People really need to know about you. You explained it well in the simplest way using real life objects.
    I'm also in need of learning implementation of linkedlist using classes, so if possible I'm eager to learn it more from you because my professor is using words we've never heard of :D

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

    Omg bro, I love you and your amazing analogy and voice. I love how you explain and explore everything simplistically. You just saved me from a semester of failure!

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

    More than the teaching, your videos are calm and ASMR like. It soothes my nerves when I watch the video.

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

    You're saving my CS first year course which I dropped, I wish I found you earlier.

  • @emanuelalecsa8407
    @emanuelalecsa8407 4 роки тому +5

    thanks, man! The way you explain is so smooth and down to Earth! Keep it up!

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

    Your simplicity in teaching, amazing man!! Concept grips with the examples make more interesting and understand in-depth, and a person learning won't forget!

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

    I love to study from you....your way of teaching is really osm..........respect from INDIA

  • @xx_leo1
    @xx_leo1 5 років тому

    ALEX YOU'RE LITERALLY A LIFE SAVER

  • @alexkim-soo2845
    @alexkim-soo2845 2 роки тому

    to hire you as a lecturer in any institute is an absolute win

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

    The way you explanation this really improved my way of viewing the constructor object.

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

    I'm from Argentina, and I got every word you said. Great teaching. My best regards for you

  • @YouSoRusso
    @YouSoRusso 5 років тому +12

    This was awesome dude. Thanks 👍 Semaphores, Concurrency, Multithreading would be some useful lessons but whatever you do I'll be a new student for some revision. Keep it up bro. Love the peaceful vibe.

  • @generalzt2886
    @generalzt2886 5 років тому +3

    I love how you explained this I have a final tomorrow and this was really helpful. The best part is how I also use eclipse to write code so all these tips are super nice.

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

    Your teaching technique relive our all problem
    👍Keep it up

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

    P.S. For anyone still experimenting with constructors, once you make your own custom constructor that takes parameters, but you still want to use the default constructor for the same class for some reason, you MUST make the default (empty constructor) as well. Otherwise it will no longer be available, and you' ll always have to enter custom parameters when you create objects of that class.

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

      Equal Alex made on the video, got it. Thanks for calling attention for this.

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

      @@wesldf my pleasure mate!

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

    Finally I understand what a constructor is? Thank you for making this video.

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

    omg thank you i understood that so much better than the hour long class about objects/constructors at school

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

    Thanks a lot buddy!Sometimes you guys don't even know how helpful you have been to others.

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

    Finally, constructor is making sense. Thanks Alex.

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

    Thank you for this .this helps so much simplifying words used in my texts, especially since its 100 online classes.

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

    Thank you! Learning Java through you now every day :)

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

    I'm switching teams at work from Web (React + Node) to Cloud (Java) and your channel has been helping me a ton so...thanks man!

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

    I literally have an exam in 45 minutes. Thanks a lot for this video!

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

    Is it normal to watch such tutorial for about the fifth time..? lol
    The struggle's is real.

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

    I just want to say thank you for making easy to follow content I learned more from watching your videos than I have all semester from a paid instructor!

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

    Your videos are great. I'm re-learning Java now and these videos make it possible. I joined Code with Mosh's Java course -- and when I need another explanation to his topics , I turn to your videos and they compliment really well, and I suggest everyone to do the same. Thank you, Alex!

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

    I spent 3 hours reading Java notes and got nowhere. Watched this video twice and suddenly it all makes sense. Thank you!

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

    Dude!!!! You are great..... I am from Pakistan and i simply love your way of teaching.

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

    So grateful that you exist. My university textbook is terrible T_T

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

      You’re lucky you get a text book. We learn solely from lectures...

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

    I can't tell you how amazing you are for this. You're probably the only reason I might pass this class.

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

    you made java a piece of cake ... thank you so much

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

    Thank you Sir- you are awesome. I have been fighting to understand this for almost a month

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

    I moved college school because of pandemic. The previous college i went was using Python and the school I'm moving to is using java. This helps me a lot to transition since I'm taking data structures now, thanks!

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

    This has been the simplest and most thorough lesson I have ever come across. Thank you for sharing and being amazing :')

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

    syso+ctrl+space also works to print out

  • @aidanakamchieva4648
    @aidanakamchieva4648 9 місяців тому

    This video is too good for this world🥺

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

    Didn't really understood my professor in college. Thank you so much

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

    Thank you for your videos. I'm still learning Java, and these videos have been much food for thought!

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

    i'm new to java and tbh you help me soooo much with your videos!
    Thank you man , hope you're good and everything is going great!

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

    thank you for breaking it down as simple as possible...subscribed

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

    Incredibly helpful, college professor's explanation made no sense but this was very clear and easy to follow. Thank you!

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

    bro I tried to understand this by watching the lecture few times but watching this made me understand the logic within 6 mins

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

    Thank you! I'm failing computer science because I have no idea what to do because I can't talk to my teacher because of Corona Virus but your videos have really helped me. Appreciate it bro.

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

    Alex , your way of teaching is simply awesome and easy to understand. Love from india..

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

    I really feel like (who the fuck disliked this video?). Man, I'm from Brazil, and I've got something to tell u. I've never seen someone like you, teaching Java with so many facility. Everything u say I can get and do by myself in my studies. Thanks a lot for sharing this with us, besides u stopped doing it.

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

    I'v just foud you ytb channel and saw most of your videos.Thank you for all that.Your teching technique is just an amazing.

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

    Thank you Alex for all this tutorials you share. They are very helpfull and intertaining.

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

    The “sysout” shortcut may have just saved my life. Thank you sir.

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

    Eye-opening!!!!! Thank you so much!!! Your explanation on constructors, passing parameters and giving it a reason behind it just makes your way of teaching, best!

  • @Chichi-jy6zm
    @Chichi-jy6zm 4 роки тому

    Well eventhough Im not good at english and obviously didnt understand all of this video but it was really helpful since i couldnt understand about constructor for like 3 months! Thank you for this video and tip LOL :) didnt know the tip either

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

    YOUR NAILING IT MEN PLEASE CONTINUE WAT UR DOING

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

    You are single-handedly saving my grade in my Java class haha

  • @abdeselamselami4532
    @abdeselamselami4532 5 років тому

    Thanks a lot Alex, for everyone the short-cut of System.out.println() is type sysout + hit buttons ctrl+space.

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

      sout Tab is much easier for System.out.println().

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

    Hello from Germany. Good content and well explained. Keep it up!

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

    THANK YOU!! I was so confused because I didn't know the default constructor was invisible.

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

    Shout out to your channel and videos. You do a good job simplifying the explanation of all these Java concepts. Definitely a big help. Keep up the good work man!

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

    Thank u so much . Your way of teaching is just incredible 🙏

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

    man you covered everything i cant thank u enough

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

    dude, I love your way of teaching. you are awesome. keep it up!!!!

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

    Man thank you, you are doing good, keep doing.
    Please make another video on API.

  • @pythonbg2457
    @pythonbg2457 2 місяці тому

    Thank you! I appreciate that stranger! I was going to have F but you saved me!

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

    Now this is a good tutorial. Large text and black on white color. Great....