Java 13 Classes and Objects

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 63

  • @hello55125
    @hello55125 7 ปีที่แล้ว +7

    Colin I think that your java classes are absolutely excellent. Most java courses/ books seem to make the subject so hard. This video on classes has realy cleared up a lot of questions for me, thankyou so much dude

  • @marc332kriss
    @marc332kriss 9 ปีที่แล้ว +1

    It was a good joke saying about your anniversary - "I'm gonna be in trouble if I don't set it correct". True one.

  • @saregamapaz
    @saregamapaz 4 ปีที่แล้ว

    Colin, I should have posted this few years ago... I make my Java students watch this video and following along by typing the code as a Lab assignment. I ask them to do this BEFORE I start this content myself in class. Your video lecture-demo introduces and motivates this concept exactly as I would. I really like that "A Class is a data type" is the 1st sentence when starting this topic, rather than a class is a blueprint of real world objects...THANK YOU for posting this.

  • @mmsky6316
    @mmsky6316 8 ปีที่แล้ว

    best teacher around. Everything just "clicks" when you explain it.

  • @galsela2608
    @galsela2608 9 ปีที่แล้ว

    Colin, thx alot for the lessons, up to now i found u the clearer instructor i found on the web, even more from the one in the uni im going to, you made things very clear to me, appreciated ! god speed

  • @pabloecarballido2742
    @pabloecarballido2742 9 ปีที่แล้ว +9

    Wow! Excellent video. Really cleared up all of my questions.
    Thanks!!

  • @theindianfoodies8759
    @theindianfoodies8759 8 ปีที่แล้ว

    nice video...and very use full videos

  • @ivbqwljrf234
    @ivbqwljrf234 10 ปีที่แล้ว

    wowowowowow. 6 hours hitting my head against the wall with blunt java text < a half hour with this video. hugely helped me, finished my objects lab from design to final comments in about 2 hours. You posses a fair quantity of swagger.

  • @Thezulusek
    @Thezulusek 8 ปีที่แล้ว

    Great tutorial. Everything starts to make sense.

  • @GabrielMLinassi
    @GabrielMLinassi 9 ปีที่แล้ว

    I want to thank you sir for the wonderful job you are doing here. Your method of teaching and the great amount of content in your classes help mr a lot to learn how to code.

  • @ThemisStantzos
    @ThemisStantzos 7 ปีที่แล้ว

    This is excellent. Both the ideas and the presentation. Thank you.

  • @perapras
    @perapras 10 ปีที่แล้ว

    Very useful to understand the concepts of Classes and Objects

  • @ReginaldOdhiambo
    @ReginaldOdhiambo 6 ปีที่แล้ว

    Thanks for clearing things up. Lots of Java books are complicated for no reason.

    • @Dfree1014
      @Dfree1014 6 ปีที่แล้ว

      unfortunately he passed away close to the begin of the year. RIP to a legend.

  • @befit_kw7762
    @befit_kw7762 8 ปีที่แล้ว

    informative video... thanks
    clear, simple, and easy to understand

  • @chuongquang225
    @chuongquang225 6 ปีที่แล้ว

    u have just saved my java life. thank you

  • @ali09killuminati
    @ali09killuminati 11 ปีที่แล้ว +1

    Amazing thanks so much

  • @BlackHawkDown2
    @BlackHawkDown2 9 ปีที่แล้ว

    Wow! You are an excellent teacher. Not only it was good hands on but it cleared a lot of concepts which my lecturer here couldn't explain properly!
    Request you to make more videos!

  • @surajshetty40
    @surajshetty40 9 ปีที่แล้ว

    great video...loved it

  • @TequilaTime
    @TequilaTime 6 ปีที่แล้ว

    Thank you for this video. Well explained

  • @ranabhatsubash5497
    @ranabhatsubash5497 9 ปีที่แล้ว

    its very well described. thank you sir.

  • @pixelthirst7282
    @pixelthirst7282 8 ปีที่แล้ว

    Great video, thanks

  • @nadunwijeweera4137
    @nadunwijeweera4137 8 ปีที่แล้ว

    Thank you Sir more cleared. java constructor method also more cleared.

  • @cookiemonster4074
    @cookiemonster4074 6 ปีที่แล้ว +1

    Thanks for the great lesson!

  • @banugaria967
    @banugaria967 7 ปีที่แล้ว

    BeautifullyExplained :)

  • @rachelr22
    @rachelr22 8 ปีที่แล้ว +1

    Thank you sir, this was very helpful

  • @ReginaldOdhiambo
    @ReginaldOdhiambo 6 ปีที่แล้ว

    Amazing thanks

  • @yahyaheee
    @yahyaheee 10 ปีที่แล้ว

    very well done, thanks

  • @Uzbeko
    @Uzbeko 11 ปีที่แล้ว +1

    Great tutorial :)

  • @investingislife2908
    @investingislife2908 7 ปีที่แล้ว +2

    I love your video and thanks!!!

  • @drnanjo
    @drnanjo 10 ปีที่แล้ว +1

    Very helpful thank you!

  • @MotivationDaily4u
    @MotivationDaily4u 10 ปีที่แล้ว

    Really useful, thank you.

  • @messedmushroom
    @messedmushroom 9 ปีที่แล้ว +1

    happy belated anniversary!

  • @stevenclark1973
    @stevenclark1973 8 ปีที่แล้ว

    Brilliant video. Thankyou.

  • @basalduat
    @basalduat 6 ปีที่แล้ว

    PLEASE Enlarge the font to 24 points so we can see better. Many of us have poor eyesight and old laptops.

  • @rokaslukosevicius5058
    @rokaslukosevicius5058 11 ปีที่แล้ว

    Can you explain how to make a relationship between objects. For example have person that is the owner of 20 dogs and the dogs that are pets to the person?

  • @user-gl1bt1ns6z
    @user-gl1bt1ns6z 7 ปีที่แล้ว

    "irish setter, that was funny"
    lol

  • @mehedimahfuz1lam223
    @mehedimahfuz1lam223 6 ปีที่แล้ว

    nice

  • @PugzofSteel
    @PugzofSteel 10 ปีที่แล้ว

    In the class Date, when you return month and return result, where are those variables going? Are they going to the main method?

  • @MateiMircea100
    @MateiMircea100 6 ปีที่แล้ว

    If you go to 5:39 and listen carefully you can hear Chubaka

  • @damiangavin3520
    @damiangavin3520 8 ปีที่แล้ว

    how do I find the next piece of this tutorial? I find it very good

    • @DrColinArchibald
      @DrColinArchibald  8 ปีที่แล้ว

      This is a link to the complete playlist
      th-cam.com/play/PL6F117B39113D9108.html

  • @BateYasho
    @BateYasho 10 ปีที่แล้ว +1

    Good tut. i leran a bit :D

  • @camilofenandez7868
    @camilofenandez7868 9 ปีที่แล้ว

    Thank you! Very good video! =)

  • @AmarSuchak
    @AmarSuchak 7 ปีที่แล้ว

    Wait - so what's better? When I want to declare my variables, should I be calling setters and getters or should I just declare them when the object is being created by modifying the constructor?

    • @DrColinArchibald
      @DrColinArchibald  7 ปีที่แล้ว

      Better to make a constructor that has a reasonable set of parameters so that the user of your class can make an object without needing to also call the setters. Am I understanding the question?

    • @AmarSuchak
      @AmarSuchak 7 ปีที่แล้ว

      Yes, perfect. So we don't really need to use getters and setters then?

    • @DrColinArchibald
      @DrColinArchibald  7 ปีที่แล้ว +1

      when you need to change the object you will need to use the setter, and when you need to get something out of the object you will need to use the getter. Later I will ague that you should use the setters all the time - even from within the constructor - so that the data validation on the instance variables will always be executed.

    • @AmarSuchak
      @AmarSuchak 7 ปีที่แล้ว

      Are you referring to something like this?
      public Date (int m, int d, int y){ //constructor
      month = setMonth(m);
      day = setDay(d);
      year = setYear(y);
      }
      And the setters return ints like this?
      public int setMonth (int m){ //mutator method (setter)
      if (m =1){
      month = m;
      }
      return month;
      }

    • @DrColinArchibald
      @DrColinArchibald  7 ปีที่แล้ว +2

      IN the constructor you only need to do :
      setMonth(m);
      setDay(d);
      setYear(y);

  • @annaphuong3260
    @annaphuong3260 7 ปีที่แล้ว

    Hello,
    Thank you for making this video; it is super helpful!
    I have one question. I combine the accessor and the mutator, which look like this:
    public int getMonth( int m ) {
    if (m >= 0 && m

    • @DrColinArchibald
      @DrColinArchibald  7 ปีที่แล้ว +1

      It is convention that these tasks be separated. One get and one set for each instance var. It is expected that the creator of the class will do it in the conventional way, so that you already know what to expect in code that you have never seen. Just go with it as a convention for now, and it will be comfortable later on.

  • @maryedwards1872
    @maryedwards1872 9 ปีที่แล้ว +1

    Thank you!!!

  • @Getaneh188
    @Getaneh188 10 ปีที่แล้ว

    you could easily generate the getter and setter methods rather than taking time typing.

  • @wiambenhammou9942
    @wiambenhammou9942 8 ปีที่แล้ว

    Thank you!

  • @leli5843
    @leli5843 2 ปีที่แล้ว

    thank you for this!

  • @BruceT-rg8bp
    @BruceT-rg8bp 10 ปีที่แล้ว

    Thanks for the video. Can someone please help me on this? What's the purpose for coding the methods in another class instead of the same class? Thanks guys

    • @DrColinArchibald
      @DrColinArchibald  10 ปีที่แล้ว +4

      I think that will become more clear as you go along... for now, just say that you want to put the methods in the class that has the data that you manipulate. It will start to feel right as you look at some more examples.

  • @leavethematrix9939
    @leavethematrix9939 8 ปีที่แล้ว

    I could not get my toString() to work. Says Month can not be converted to a string.Any ideas why?public String toString()
    {
    String result;
    result = month;
    return result;
    }

    • @zubairsafi2025
      @zubairsafi2025 8 ปีที่แล้ว

      That's because month is an int. This works, result = month + ""; Because of the quotes turns it into a String. If you check the video it shows that result = month + "/" + day + "/" + year; And it works because of the quotation marks which represents a string. And if result was an int, as in int result; then result = month + "/" + day + "/" + year; would not work.

  • @Zaleravon
    @Zaleravon 10 ปีที่แล้ว

    lol in the birthday example he chose my friend's bDay

  • @Jadhisham
    @Jadhisham 8 ปีที่แล้ว

    irish setter :)

  • @mylez187
    @mylez187 10 ปีที่แล้ว

    you could use alternative get and set method names but no one will work with you xD