Java Tutorial – 20 – An Array of Objects

///Java Tutorial – 20 – An Array of Objects

Java Tutorial – 20 – An Array of Objects

FavoriteLoadingAdd to favorites

In this video I will be showing you how to create an array of objects (well reference variables but for some odd reason everybody calls it an array of objects) which is a very important concept for object oriented design, and will help us better understand the Java programming language.

Java468x60

Remember to follow me on Google+

If you are new to Java go check out the playlist for the series, and get caught up on everything you need to know about Java:

Just a reminder that my website is currently not available.

source

By |2019-07-13T21:06:12+00:00July 13th, 2019|Java Video Tutorials|36 Comments

36 Comments

  1. Thushan Chathuranga July 13, 2019 at 9:06 pm - Reply

    Thank you very much. I lost more than an hour. What I forgot to do was initializing each object after the creation of array. Thanks bro πŸ‘

  2. Marvin Ray Dalida July 13, 2019 at 9:06 pm - Reply

    So if i have car[0] can i set it equals to different class other than Class car?

  3. Krab Mann July 13, 2019 at 9:06 pm - Reply

    Nice simple example, helped me understand something I was going in circles with.

  4. JT Saiyan July 13, 2019 at 9:06 pm - Reply

    How do we do this at the 2:14 method?

  5. Defender ofOasis July 13, 2019 at 9:06 pm - Reply

    I did that but I got:

    error: non-static variable this cannot be referenced from a static context

  6. Saketh Buddharaju July 13, 2019 at 9:06 pm - Reply

    what is the application you are using?

  7. Mizuki SPLands July 13, 2019 at 9:06 pm - Reply

    Good explanation, you saved me for my major assignment. Thanks man best teacher in the world.

  8. Noah July 13, 2019 at 9:06 pm - Reply

    I finally found an answer for my problem because I made 2 classes an tried to make the same thing like you in the Car class (with the voids getUsername, getPassword…) but I had an Exception with my Array because I don't have much Experience with Arrays and I didn't find any answer in my Java-book or german tutorials. But you helped me, thank you!

  9. RonSpwan11 July 13, 2019 at 9:06 pm - Reply

    HOLY MOLY. Amazing work, and thank you so much.

  10. Higgs Boson July 13, 2019 at 9:06 pm - Reply

    Reference variable != object. It is just a name that represents the location of the object in the heap.
    By the way, great lecture.

  11. Ryan Joshua July 13, 2019 at 9:06 pm - Reply

    THANKS! This was really helpful. Simple explanation but can be used for complex problems. More of this pls <3

  12. Thomas Morey July 13, 2019 at 9:06 pm - Reply

    I know this video is old as hell, but I have a few questions: 1, what if my object has a constructor, how would I initialize the Array? Ex, Grades [] grades = new Grades(); but the constructor requires Grades(str, dbl, dbl, dbl, dbl, dbl, dbl)? Would I still be able to change the contents of an object in the future? 2, why are you using light theme, man? My retinas burn

  13. emy July 13, 2019 at 9:06 pm - Reply

    can i send u a java questionΒ  that i could not solve it??

  14. Arbitrary Zero July 13, 2019 at 9:06 pm - Reply

    I was here because of the puzzle on page 90 from Head First Java…

  15. Niel Agi July 13, 2019 at 9:06 pm - Reply

    Thanks for teaching without wasting my time

  16. ibrahim unal July 13, 2019 at 9:06 pm - Reply

    u should buy urself a new brand computer with the money u earned from utube

  17. Arvy D.Andhika July 13, 2019 at 9:06 pm - Reply

    hey dude, you save my life!.

  18. Arnmazing July 13, 2019 at 9:06 pm - Reply

    only thing that bothers me is your mouse pointer, but other than that great explanation homie!

  19. Chris Jenkins July 13, 2019 at 9:06 pm - Reply

    Whats the temp variable for, im missing something, why is it int

  20. python ing July 13, 2019 at 9:06 pm - Reply

    Agree with jose Escoto

  21. Kaitlyn Costanza July 13, 2019 at 9:06 pm - Reply

    Oh my gosh, I think you're the only Java programmer on youtube that is actually clear and concise and tells me exactly what I was looking for. Missed this lesson in class so I needed to be able to learn it for the assignment at the end of the week, and you taught this exactly like my professor would, thank you so much! πŸ™‚

  22. atonewiththedust July 13, 2019 at 9:06 pm - Reply

    That cursor tho

  23. thatnolan July 13, 2019 at 9:06 pm - Reply

    Thanks! but your cursor was bothering me the entire video.

  24. baneinei July 13, 2019 at 9:06 pm - Reply

    Great video

  25. Bailey Hughes July 13, 2019 at 9:06 pm - Reply

    Thank you so much! I know it's not much different but my book only explained how to do singular objects rather than arrays, and my final requires an array of objects. I couldn't figure it out 'til you helped me out!

  26. Arooba Fatima July 13, 2019 at 9:06 pm - Reply

    M in love with u man!!!!!!!!! THANKS ALOT!!!!!

  27. menobody11 July 13, 2019 at 9:06 pm - Reply

    how can i make an array of audio?
    i tried but it won't work.

  28. Michael John Ducut July 13, 2019 at 9:06 pm - Reply

    bro, you helped me a lot. add 1 to your subs. πŸ™‚

  29. Dorin B July 13, 2019 at 9:06 pm - Reply

    hi, how do i verify if an object from my array from position 0 or position 1 is created or nor ? than if not to create it and put it to that empty position of array ?

  30. TheGta4you July 13, 2019 at 9:06 pm - Reply

    keep the great work UP!

  31. Allie Beckman July 13, 2019 at 9:06 pm - Reply

    You totally SAVED MY ASS with this one thank you so much!!!!!! I just spent the past 4 and a half hours trying to understand this assignment I have I re-read the chapter we're on, looked all over for specific examples and nothing. I was actually SO CLOSE to figuring it out too I had everything except while trying to print the object I had it written as object.blablah and didn't even think to have object[index].blablah(). that's all I was missing and you cleared it up. You're the best!! I look forward to seeing more of your tutorials πŸ˜‰

  32. ooH LOL July 13, 2019 at 9:06 pm - Reply

    why you didn't show your Car class? πŸ™

  33. Matt May July 13, 2019 at 9:06 pm - Reply

    Great tutorial – clear and to the point!

  34. Abdullah Jimmy July 13, 2019 at 9:06 pm - Reply

    Thanks A lot reeally clears things up. Also nice voice

  35. No Name Brand July 13, 2019 at 9:06 pm - Reply

    What font do you use in eclipse?

  36. lolwa alhrbi July 13, 2019 at 9:06 pm - Reply

    thanks

Leave A Comment

*