Java Programming Tutorial – 59 – Class to Hold Objects

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

46 responses to “Java Programming Tutorial – 59 – Class to Hold Objects”

  1. AJay Gupta Avatar

    Bro you skipped over interfaces,I was expectiong you to cover that!!

  2. Jorge B Avatar

    I do that before to see the next tutorial.

    public class DogList {
    private Animal[] theList = new Animal[5];
    private int i = 0;

    public void add(Animal d) {
    if(i < theList.length) {
    theList[i] = d;
    System.out.println("Animal added at index "+i);
    i++;
    }
    }
    }

    I know it can have more stuff but i did that in 30 second more or less (its just change Dog for Animal)

  3. ManOFSteel Avatar

    i'm i the only one having this bad habit of liking thnewboston videos even before it starts?

  4. AJD Avatar

    YOU DON'T TELL ME WHAT TO DO, BOSS!

  5. Prabin Ojha Avatar

    And with that last few seconds, bucky diverted me. Again!

  6. Pete N Avatar

    Bucky, you are a big help. I am new this and JAVA is kicking my butt. Thank man. Please keep the video's coming…

  7. Tebogo Khumalo Avatar

    guyz ..How do you know that u need to increment like this " +x" or like this x+ ??

  8. Tor G Avatar

    Do people who work with programming ever use this??

  9. Mahgoub Abbas Avatar

    What 500 videos is he talking abt?

  10. Ermal Aliu Avatar

    Can anyone explain this line : theList[i]=d;

  11. fuckyeahlions Avatar

    and in the 59th tutorial, we started using uppercase naming conventions for classes! HOORAY!

  12. kokila manohara Avatar

    hey guys is there any difference in the program using [ ] as shown in below? or does it have the same effect?

    i mean using [ ] before "thelist"
    private Dog thelist [ ] = new Dog [5];

    and using [ ] after "thelist"
    private Dog [ ] thelist = new Dog [5];

  13. swiffty1 Avatar

    Hmm… Dog objects array holding objects with the same object identifiers?

  14. Shamak Avatar

    What's up with not using the default package and/or why does Bucky use it? What does that even mean?

  15. ROVA Avatar

    Knocking on the door was perfectly timed as a ' Boss ' – situation, well done bucky 🙂

  16. Harith Perera Avatar

    What if iI put the variable i as Static ??

  17. Besher Rez Avatar

    can we get rid of thelist array ? is it necessary to put?

  18. Yunq Wang Avatar

    thanks a lot!love your tutorials

  19. Bashir Avatar

    "we'll name it d. Short and sweet" – bucky 2009

  20. Kathy Avatar

    Thank you, bucky for making these videos. They are awsome! After I watched your Javal tutorial 59, you said your 500 videos would come up. Could you tell me where they are? Thank you a lot!

  21. Shithi Maitra Avatar

    Does the 'if' statement work like a 'while' loop?

  22. mona khatuja Avatar

    Hey bucky.. Your vdos are great.. Thanks man!

    Can you pls tell me in which video have u taught about Interfaces?? Also can you explain in a video with an example difference between interface/inheritance/abstract.. it is kinna confusing as in case of abstract class we need to implement its methods and also in case of interfaces.. Please correct me if i am wrong.. I wanna understand this badly and never get confused.. 😐

    Thanks in advance..

  23. Jenny Kaur Avatar

    Hi Bucky may I know your email Id please?

  24. gamma2626 Avatar

    "We'll name is D for now… short and sweet."  I'm really just curious as to whether that pun was intended. I guess we'll never know. LOL

  25. GiraffeKey Avatar

    Why does everyone say polymorphism is confusing? I'm 14 and I understand it just fine.

  26. Andrey V Avatar

    Hey, Bucky, would you publish some Objective C tutorial course? would be awesome!

  27. Spectrum Avatar

    Wait, dog and fish! Those are still food types! You have not escaped the food!

  28. Dom Tullipso Avatar

    Thank you, this was very helpful.

  29. RacmusDK Avatar

    Dude I know this is beginner stuff – but no reason to teach bad coding standards… Like.. You wouldn't create a "DogList" .. you would create an interface for a List that is generic. You then make the actual list Implementing that interface. The list will then (if it is array-based) have to have an Object array; Object[] array = new Object[10]; That list will then be able to hold any kind of Object.. aaaaand you can make multiple different Lists that implement the same Interface (but instead might be referenced-based) and the two List would be of the same type since they implement the same interface. 

  30. Playitsfree Avatar

    How do i make the stuff that i coded ".exe"

  31. pta2002 Avatar

    Finally, you got rid of those stupid classes. They smelled  like fish. Even though the "Fish" class still smells like fish

  32. pta2002 Avatar

    im watching 15 tuts/day. bucky, YOU ARE THE BEST, YOU SHOULD BE A TEACHER

  33. bomle321 Avatar

    i am looking forward for the file read and write tuts to start the register / first image page of my game 😉

  34. DJ Pedobear Avatar

    FREAKING JAVA VEHICLE IS MAKING ME CRAZY!! haha

  35. Robert NgoVan Avatar

    It is good if you make "i" a static variabile ?for more safety?

  36. Ibrahim Nadir Avatar

    Link  to 500th Video? :/

  37. Haasan Spiegelman Avatar

    you make an array from "Dog.class", why that ?

  38. فهد العتيبي Avatar

    you did not show as what is interface,would you please.

  39. Erikas Rudinskas Avatar

    this is not even tutorial. This is hint.

    I found that his tutorials are always tutorials and he don't actually shows real hints like this. 🙂

  40. Dmitry Avgustis Avatar

    Hey Bucky, really love your videos, nobody explains these things as clear as you do. But there's one problem, you should teach people to respect Java naming conventions. By this I mean naming classes with capital letters, each new word in a variable name with  capital letter and so on and so forth. 

  41. Mike Tibebu Avatar

    you are the greatest human 

Leave a Reply

Your email address will not be published. Required fields are marked *