Array vs. ArrayList in Java Tutorial - What's The Difference?

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

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

  • @whatisahandleeee
    @whatisahandleeee 2 ปีที่แล้ว +433

    Easily top 3 programming teachers on youtube. No joke. You seem to answer the exact questions that a newbie would asks and you answer in such a way that gives exactly the information that is needed.

    • @ilhammammadli4560
      @ilhammammadli4560 2 ปีที่แล้ว +1

      who is rest?

    • @whatisahandleeee
      @whatisahandleeee 2 ปีที่แล้ว +5

      @@ilhammammadli4560 Corey Schafer is one of them for sure.

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

      Agreed! I´m a first semester Computer Science student and we must do these little coding exercises. The lectures don´t really help, but these videos really got me through these tasks.

    • @abflores11
      @abflores11 2 หลายเดือนก่อน

      I wish our professors explain like this, the explanation is so clear

  • @aligmayu5322
    @aligmayu5322 3 ปีที่แล้ว +385

    PLEASE DONT STOP TEACHING THIS THINGS.. I HAVE WATCHED A LOT OF GUYS LIKE U ON TH-cam AND UR ONE OF THE BEST. AND STILL I LOVE JAVA MORE EVEN AFTER MEETING PYTHON

    • @trynafindkaygee_
      @trynafindkaygee_ 3 ปีที่แล้ว +2

      i can relate to that❤😎👌

    • @spacepowerofficial1187
      @spacepowerofficial1187 2 ปีที่แล้ว +6

      I didn't see the DONT and I got really confused

    • @butterandjamtoast
      @butterandjamtoast 2 ปีที่แล้ว +4

      Caps Lock. The cruise control to cool 😎

    • @ArsArs-x7i
      @ArsArs-x7i ปีที่แล้ว

      Axper angleren chem xosum ches kara bacatres incha patmum?

    • @darrenfrancis8126
      @darrenfrancis8126 ปีที่แล้ว +3

      @@spacepowerofficial1187 PLEASE STOP TEACHING
      imagine

  • @mk17173n
    @mk17173n 2 ปีที่แล้ว +11

    This dude is the man. His videos are better than others because he answers the question why. Why do we do it this way? Keep it up dude.

  • @kerwinso
    @kerwinso 3 ปีที่แล้ว +132

    You explain diamond operators (starting at 4:19) in 20 seconds better than others who have taken over 5 minutes. Well done sir.

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

    TH-cam algo sucks for not recommending this wonderful video for Java learner! But better late than never!

  • @anityyu
    @anityyu 2 ปีที่แล้ว +6

    I love how my school explains these things in 10 videos and it takes over 5 hours to watch all of them, while I can easily learn it from your video in just 18 min

  • @mastermatt6090
    @mastermatt6090 9 หลายเดือนก่อน +2

    Thanks dude, you make everything so simple!

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

    Literally I was crying after my class cause the teacher really did not explain as clear as this video. Honestly, thanks a million!🥰⭐

  • @carlosgranda8493
    @carlosgranda8493 3 ปีที่แล้ว +1

    Dude, I swear to God how can you explain so well that I didn't get distracted. bro when my teachers explain I lose focus so fast, dude keep it going you are amazing.

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

    you are my hero man, I've been using fixed array my whole life, you're best than my professors in college

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

    I'm working on an adaptation of 2 REST API I did on Node with MongoDB to Spring Boot with MySQL. But every once in a while it's great go back to the hows and whys of Java. 👏👏👏

  • @HuwJones
    @HuwJones 2 ปีที่แล้ว +39

    Great video. Two things....it's considered good practice to use the interface on the left side so List instead of ArrayList before the variable name. And while you are right that the ArrayList itself can grow and shrink it's really important to be aware that the array that backs the ArrayList (yes there's an array hiding inside the ArrayList implementation!) does not shrink automatically after the ArrayList has grown...this can be very significant when profiling the memory footprint of an application. Lastly, it would be really good to have a video on why you'd pick a primitive representation over its Object form.....performance, memory usage, etc.

  • @beneielohim
    @beneielohim 2 ปีที่แล้ว +1

    90% of my Java class success is owed to you. thanks man!

  • @robertjr8205
    @robertjr8205 9 หลายเดือนก่อน +1

    Watching your videos helps me understand so much better. You explain everything perfectly and add in the little important details that most books or instructors seem to not mention,
    Thank you!

  • @sanabil2531
    @sanabil2531 3 ปีที่แล้ว +269

    you are going to have million subscribers one day, already telling ya, you teach so well :)

    • @wankhede09
      @wankhede09 3 ปีที่แล้ว +2

      I Second that

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

      That's a nice notion but no he wont. Programming is not that popular. Only stupid things are popular, entertainment and food and monkeying around

    • @alicewu6674
      @alicewu6674 2 ปีที่แล้ว +3

      I agree... he is great teacher, I love his coding tutorials cuz they are the ones that are among the most understandable and well-explained:)

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

      indeed

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

      He is close

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

    You're such a great teacher. Thank you for what you do! I love your videos

  • @KyleHarrisonRedacted
    @KyleHarrisonRedacted 2 หลายเดือนก่อน +1

    I think the thing missing from your oherwise excellent tutorial here is _why_ you'd want a fixed array vs a dynamic one. Really, everything a fixed array can do, a dynamic one can as well, so why bother with the headache?
    And the answer is performance. Heap Memory allocation is expensive, and an array uses contiguous memory; so when a dynamic array gets added too and grows and there's not enough room for expansion in contiguous memory, the whole thing gets copied to a new location where there is room, with the old one marked to be swept for later. This is a very slow and cpu intensive operation. But it's useful for the types of situations where you don't know for sure how big or small something might be up front.
    But if you know you're generating a 2d map of 32x32, use fixed. If you know you're getting at most 5 records from your database, use fixed. Why? Because when declaring the fixed array variable it allocates enough general memory to store that many of that object or primitive, once. Overwriting an element's null or existing value with another value is a _faaarrrrr_ less expensive operation. And while the conveienice of a foreach loop is indeed a nice and safe way to loop, don't forget there's nothing really wrong with setting some upper limits where it makes sense, and definitely saying "hey this is exactly how much memory I will probably need to do this", hydrate the elements with the values you get, and during your normal for loop through the data just check for null and break out. Always ask yourself when you creating a dynamic array... do you _actually_ need to be adding and removing elements? If the answer is yes, go for it, but you might be surprised to learn just how often you dont need it.
    But I still wouldn't use the the actual "fixed" arrays, those method the ArrayList wrapper comes with are just too handy. But if you supply an integer into the contructor of the ArrayList? It'll create the intiial array with that many values once_. ( `new ArrayList(500)` ) That gives you _all the benefits of what the fixed array does, with all the benefits of what the dynamic array wrapper provides (including the ability to add and remove elements if you must)

  • @sarangsambharia2634
    @sarangsambharia2634 20 วันที่ผ่านมา

    I believe the best part about your videos is that you make everything sound so simple and easy even if it's not. that makes all the topics you teach less scary. You are gifted. Good Work man.

  • @filipemelo1107
    @filipemelo1107 2 ปีที่แล้ว +8

    I freaking love the way you approach the subject on your videos... It's so simple and yet, complete; I can understand everything so easily.

  • @abdullahpopalzai6543
    @abdullahpopalzai6543 3 ปีที่แล้ว +1

    Please do not stop teaching, you are great!!!!!!

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

    You're the best because you speak fast and get direct to the point with the exact needed amount of information, period.

  • @erickferraz5529
    @erickferraz5529 3 ปีที่แล้ว

    Dude, thanks a lot. I’m from Brazil and just had 3 hours of class in my own language and couldn’t get what I got in 17 min in your video. U r a legend.

  • @fridolinmeier661
    @fridolinmeier661 2 ปีที่แล้ว +1

    Just searched for a good video and wow I could not have found a better one. Thanks a lot.

  • @mario_luis_dev
    @mario_luis_dev 2 ปีที่แล้ว +5

    The performance difference does add up if you’re using a ton of arrays in your code, or if you’re iterating a lot over the same array(s). With ArraysList Java has to do dynamic allocation behind the scenes, meaning it has to allocate new memory AND copy all the elements from the previous array list whenever you want to resize to a new larger array list. It can definitely slow down your code if you have lots of these lying around or if you’re iterating a lot.

    • @Nallu_Swami
      @Nallu_Swami ปีที่แล้ว

      Could you specify out of both of them which were to be faster if used non iteratively many times or even if one of them is to be faster how much of a time difference would it make?

  • @ralphrgore
    @ralphrgore 2 ปีที่แล้ว +1

    John, I discovered you yesterday and you are one of the best!

  • @oldschoolmath8480
    @oldschoolmath8480 3 ปีที่แล้ว +23

    Thanks so much for sharing this video! We watched this in my AP CS A course after finishing a unit on Arrays and you did a great job of giving us an intro to ArrayLists.

  • @깃짱
    @깃짱 2 ปีที่แล้ว

    Im a student in south korea! Ive been having a hard time learnjng java on my own still im good at python or javascript! I love your java lectures. Thanks a lot!!!!

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

    this is the best java tutorial i have ever watch , i wish John had a complete series from the basics up, i can beat my chest and say i understand the differences between Arrays and Array list, I recommend it for anyone looking up the internet for answers to arrays and array list

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

    as I was watching I thought "BUT-BUT you cant DO THAT!" and then you wrote "//you can't do that "
    and i got just a nice ass dopamine hit, thank you.

  • @preciouspearl8583
    @preciouspearl8583 ปีที่แล้ว

    Thumbs up i searched so many tutorials but find yours the straight to the point one

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

    Should point out that if you're stuck in a situation where you absolutely have to work with arrays, you can still use the Arrays utility class to provide some of these conveniences, which gives you e.g. Arrays.sort(arr), Arrays.copyOf(arr, len) for resizing, Arrays.toString(arr) for pretty array formatting, etc. You can also iterate over them with e.g. for (String str : strArray). At the same time, while it is true these capabilities are not strictly limited to Lists or Collections only, I do end up still using them almost exclusively for the reasons you shared; just the sheer productivity they provide for the time spent coding is usually reason enough to justify the overhead.
    Thanks for the video!

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

    This video took me only 17 mins to get fully understand the basic concept of Array and ArrayList.
    Thank you.

  • @tanu_matre
    @tanu_matre หลายเดือนก่อน +1

    Best video on array and arraylist,on point....plz keep uploading ...it really helps 👍💫

  • @Charnelex
    @Charnelex 3 ปีที่แล้ว +1

    John, I'm just getting started in Java and I appreciate you. Commenting to help the algorithm.

  • @sajidamoin771
    @sajidamoin771 7 หลายเดือนก่อน

    You are one of the smartest teachers on youtube… I love your teaching style…Whenever I want to learn a java topic, I first search it on your channel because you explain every topic in a very simple way. Not too much of information not too less… just as much as needed for a beginner… My favorite ❤️

  • @shirinelmanson7839
    @shirinelmanson7839 3 ปีที่แล้ว +10

    I am literally I am shocked how come you do not have 1 million subscribes ..the way you teach is awsome.

  • @amanmotghare7927
    @amanmotghare7927 ปีที่แล้ว +18

    Johnny Sins is really a great java teacher

  • @IronMeDen1
    @IronMeDen1 หลายเดือนก่อน

    Hey John! I just wanted to say thank you very much for taking the time to make these videos. I teach Java and I've been using your videos as inspiration (and repetition for myself when needed) because you provide such clear and concise explanations to so many concept. So... THANKS!

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

    Amazing. In 15 minutes I've learned more from you than I have in 10 weeks from my CSC205 professor...

  • @thekevinfx-krouxer
    @thekevinfx-krouxer 3 ปีที่แล้ว +1

    English is not even my first language but I understood most of the things you said, this is pretty helpful, you will be big one day

  • @berearobinson6588
    @berearobinson6588 2 หลายเดือนก่อน

    You're the best, sincerely, thank you. The online textbook my university uses is extremely dry and hard to understand. It's always so much better to see someone show how to do something by doing and breaking it down in simple terms. Thank you so much again!

  • @tinongsot6267
    @tinongsot6267 2 ปีที่แล้ว +1

    This channel is really underrated, I learned a lot just from this video.
    You’re doing great. Thank you John

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

    I've been out of the Java Ecosystem for years, but I randomly got to your channel I have been enjoying just listening on some of the details of Java again. Great content.

  • @CoolBear619
    @CoolBear619 11 หลายเดือนก่อน

    Thanks much John! Because of you I have cracked 2 interviews. Loads of love from India. Keep teaching us!🎉

  • @WoodyC-fv9hz
    @WoodyC-fv9hz 4 หลายเดือนก่อน

    Wow. I compare you with my Java Prof at Uni Rheinland, Germany. He thought he was cool, but it took me long, to get the Java basics, while listening to his lectures. Your teaching method is amazingly more efficient in contrast to his. I am slow in my comprehension, not very intelligent, but within 15 minutes, you were able to help me resolving an issue revolving about some ArrayList-storage of Long Integers in the lower scale of billions of iterations and the numerical output in the order of a quadrillion (found some java JVM memory issues here). My bad programming :(
    I applaud your generous input into our Java community.

  • @owenkelly3043
    @owenkelly3043 2 ปีที่แล้ว +3

    Why am I paying thousands to learn this at college when youtube is so much better

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

    Just like Python has a Sentdex, Java has a John 💞💞 You guys are awesome!

  • @PrinceJeniFX
    @PrinceJeniFX ปีที่แล้ว

    YOU ARE MY NEW TEACHER RIGHT NOW ON TH-cam. I WANT TO SET MYSELF ON A MISSION TO WATCH ALL YOUR JAVA VIDEOS! WELLDONE!!!

  • @zachjs2721
    @zachjs2721 6 หลายเดือนก่อน

    I learn more from you than college professors. You flow through your explanations and it really helps someone like me with adhd lol

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

    I normally do not comment on videos but I was very impressed by this video. I would not consider myself a newbie when it comes to coding with java. With that being said to often video do not go in-depth enough to to explain advanced questions relating to specific topics. Right now I am studying micro process relating to java. You answered my question on whether ArrayList are dynamic or fixed along with answer my question on whether or not this micro process would have a large impact on the run time. With that being said I still have one question about ArrayList you did not answer, ArrayList use the generic indicator "< >"(Dimond operator). I was hoping to learn more about how this aspect of ArrayList ties into its functionality. As of right now my understanding is that ArrayList work as a generic class, allowing it to take in/store a wide range of data types. if this is the case I would love to know more about how this ties into the fact it cant work with primitive types and only objects of type class(rapper classes). If you have any resources or information on why ArrayList use the generics indicator "< >" I would love to look into it. Once again thank you for your very informitave video.

  • @JACINTADOITA
    @JACINTADOITA 3 หลายเดือนก่อน

    My Exam is on Monday and my teacher did not cover this topic on JAVA. By watching this video I'm prepared for my Exam, thanks very much.

  • @tbone587
    @tbone587 2 ปีที่แล้ว +1

    I been using java for over a decade and I have still been enjoying your videos! You explain things very well and even these basic concepts are engaging to watch lol

  • @aces8481
    @aces8481 2 ปีที่แล้ว +5

    you are 100% my go to person on TH-cam for beginner tutorials -> explanations are always really beginner friendly and so clear and easily digestible. Thanks a ton man

  • @thecolorblue7427
    @thecolorblue7427 2 ปีที่แล้ว +21

    I was not expecting such a easy to understand, and great tutorial like this! thank you so much

  • @fractals330
    @fractals330 ปีที่แล้ว

    I'm using these videos to prepare for my first year Java course. Thank you so much!

  • @kocovali7295
    @kocovali7295 11 หลายเดือนก่อน

    my english its not so good, but you speak so clearly so nice i understand everything in your videos. As an Java beginner i am very very thankfull to you!

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

    I just noticed that sweet Kramer portrait behind you Haha

  • @aravindhkumar69
    @aravindhkumar69 ปีที่แล้ว

    You are really superman.. Because your video helpful to everyone... I saw a video from tamilnadu in south India....... Your are my best teacher

  • @stingray-q5p
    @stingray-q5p ปีที่แล้ว

    You cannot believe how much my future is dependent on you. Keep at it John. Your work is amazing man. God bless

  • @user-ec6ej4dp6t
    @user-ec6ej4dp6t 2 ปีที่แล้ว

    I wish I started learning from youtube a month ago. Not learning anything in college programming. Going to school for Networking + Cyber security so this is my last programming class. You explained this better than my last 4 weeks in class going crosseyed.

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

    Wow this explained clearly what i've learned in a 3 hours java course in univ.

  • @ghettoslick2000
    @ghettoslick2000 หลายเดือนก่อน

    Thanks i am currently taking java in college and your videos really help alot

  • @Cosmos0000
    @Cosmos0000 ปีที่แล้ว

    Having spent a semester learning and working with C (and now learning Java in my CS classes), I have to say that the dynamic size of array lists sure does have me excited :D

  • @tatsueureka392
    @tatsueureka392 2 หลายเดือนก่อน

    I am studying from Udemy but I got confused because of the way the tutor explains. However, man you clear those confusions. Thanks man.

  • @keremgobekcioglu4686
    @keremgobekcioglu4686 ปีที่แล้ว

    Liked this video , John. I have started to code in Java , after 1.5 year with C and C++. Now i'm learning some differences from you. Keep up.

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

    Its mind blowing how your channel has so few subscribers....

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

    Good video. Only thing I would like to add: You can add and remove elements when working with arrays, even if not directly. You would work with javas copy methods to do so.

  • @jaspersumugat6951
    @jaspersumugat6951 ปีที่แล้ว

    Such a lifesaver, I'm currently working for our activity involving arrays and this video showed up. Very informative, no subtle introduction just worth of my remaining time haha. Thank you so much!

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

    love from India bro....u know exactly how to teach....just amazing

  • @aucusticguitar8069
    @aucusticguitar8069 2 ปีที่แล้ว +1

    If arraylists were a product, then you just sold me your entire stock!

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

    i love how you explained this rn and em crying co'z I really don't understand it at first. so yeah thank you so much john.

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

    Best Java teacher ever

  • @stephenfoster9009
    @stephenfoster9009 8 หลายเดือนก่อน

    I’m new to Java and need to learn for my job. Thanks for the videos!

  • @mohamedmada4159
    @mohamedmada4159 3 ปีที่แล้ว

    Glad that you've mentioned that ArrayList do so much behind the scenes, I'd have loved to see you go more in depth regarding the difference in speed and how they really work at a lower level, But again as you said the difference between both is barely noticeable.
    Thanx dude keep at it

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

    Hey John! Thank you very much for taking the time to teach like this

  • @wayneinteressierts9973
    @wayneinteressierts9973 ปีที่แล้ว

    Man, John! Thank you so much! I‘m about to start my first developer job and see your videos daily! You are so great help!!! Please keep going!

  • @maryozonkwor-ei8vw
    @maryozonkwor-ei8vw 7 หลายเดือนก่อน

    Just what i am looking for. And u explain like swift and smooth . Tnx

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

    this video really deserves that thumbs up. Tnx

  • @alvinashneel9124
    @alvinashneel9124 ปีที่แล้ว

    Bruh
    . Hope you gain a ton more subscribers asap.. ur the reason i started learning Java..

  • @sweetshoez
    @sweetshoez ปีที่แล้ว

    Thanks again this is exactly what I needed coming from more user-friendly languages

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

    passing an arraylist to a method? Keep up the great work!

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

    Man i just love you so much. This is so clear and understandable.

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

    Thanks Coding with John! One of the best videos I've seen throwing so much light on this subject.

  • @HatTrick4030
    @HatTrick4030 ปีที่แล้ว

    Awesome!! as a refresher I alwasy have to come back and re-study the already-studied topics. Thanks for this great video

  • @gabrielmicillo7763
    @gabrielmicillo7763 2 ปีที่แล้ว +1

    This channel and its content its excellent.. im learning Java and I found it so much easier with these videos than my actual lectures. Also the edition of these videos is great. Please dont ever stop making videos about Java. I honestly think is by far the best there is on youtube, and all divided on little videos so it doesnt feel overwhelming like starting a new course.

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

    Keep this up man, your videos are helping me so much!

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

    John, you are an excellent excellent teacher....I have seen many of your Java videos, always learn fast and solid

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

    Cool video. So informative yet so clear and easy to understand. I’m learning java programming as a hobby language and your explanation is the best I have seen on TH-cam!!!

  • @aadi.p4159
    @aadi.p4159 3 ปีที่แล้ว +1

    clean precise and too the point.. big ups bro

  • @RobRoss
    @RobRoss ปีที่แล้ว

    I’ve been using Collection Lists for so long, I forgot that the Java Array was fixed size! 😂 Thanks for the reminder.

  • @techpod4IR4U
    @techpod4IR4U ปีที่แล้ว

    I’m here because I’m writing OCA in 5 weeks, I love how you explain and on point on what is expected. I would love to go through your learning but I see you not available on UDEMY

  • @saudaminisawant961
    @saudaminisawant961 8 หลายเดือนก่อน

    Excellent explanation of concepts ....great John

  • @AnaCristina-ve7wh
    @AnaCristina-ve7wh 8 หลายเดือนก่อน

    Thanks, you're a great teacher!! It's incredible how you can make it so easy to understand

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

    You are insanely good at teaching!

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

    This was super useful. I was forced to use an arraylist in this program and everything I was doing was not working. Though mine is a bit different since they are class objects, I figured it out with your help. Thank you so much. Arraylist remind me of arrays in python.

  • @John_Henry83
    @John_Henry83 ปีที่แล้ว

    Thanks for this video. I googled ArrayList and Linked list and got a LOT of sites but non of them made sense to me and a few of them just made me more confused.

  • @Av-fn5wx
    @Av-fn5wx ปีที่แล้ว

    Brilliantly explanation. Clear and concise ❤

  • @RubyBasinga
    @RubyBasinga 2 หลายเดือนก่อน +1

    Love your classes! Question. Which IDE are you using?

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

    Please make more videos. I really like your teaching style. Thanks...

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

    Nice video John, but with one little flaw. You don't need to write a loop to print an array.
    String[] names = {"Amy", "Naomi", "Lovina"};
    System.out.println(Arrays.toString(names));