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

  Рет қаралды 487,351

Coding with John

Coding with John

3 жыл бұрын

Arrays vs. ArrayLists - What's the difference? How do you use each of them, and which one should you use and why?
We'll go in-depth about the similarities and differences between Array and ArrayList in Java, and talk about how to create them, add elements, remove elements, and more.
This is a beginner friendly beginner's Java coding lesson tutorial, where we'll talk all about using Arrays and ArrayLists.
Learn or improve your Java by watching it being coded live!
Hey, I'm John! I'm a Lead Java Software Engineer who has been in the industry for over a decade. I love sharing what I've learned over the years in a way that's understandable.
Let me know what else you'd like to see!
Links to any stuff in this description are affiliate links, so if you buy a product through those links I may earn a small commission.
📕 THE best book to learn Java, Effective Java by Joshua Bloch
amzn.to/36AfdUu
📕 One of my favorite programming books, Clean Code by Robert Martin
amzn.to/3GTPVhf
🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial
www.audibletrial.com/johnclean...
🖥️Standing desk brand I use for recording (get a code for $30 off through this link!)
bit.ly/3QPNGko
📹Phone I use for recording:
amzn.to/3HepYJu
🎙️Microphone I use (classy, I know):
amzn.to/3AYGdbz
Donate with PayPal (Thank you so much!)
www.paypal.com/donate/?hosted...
☕Complete Java course:
codingwithjohn.thinkific.com/...
codingwithjohn.com
Full source code available here: codingwithjohn.com/array-vs-a...

Пікірлер: 519
@whatisahandleeee
@whatisahandleeee 2 жыл бұрын
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 Жыл бұрын
who is rest?
@whatisahandleeee
@whatisahandleeee Жыл бұрын
@@ilhammammadli4560 Corey Schafer is one of them for sure.
@sophie6425
@sophie6425 Жыл бұрын
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.
@glefordbanglayan5322
@glefordbanglayan5322 3 жыл бұрын
PLEASE DONT STOP TEACHING THIS THINGS.. I HAVE WATCHED A LOT OF GUYS LIKE U ON KZbin AND UR ONE OF THE BEST. AND STILL I LOVE JAVA MORE EVEN AFTER MEETING PYTHON
@trynafindkaygee_
@trynafindkaygee_ 2 жыл бұрын
i can relate to that❤😎👌
@spacepowerofficial1187
@spacepowerofficial1187 Жыл бұрын
I didn't see the DONT and I got really confused
@butterandjamtoast
@butterandjamtoast Жыл бұрын
Caps Lock. The cruise control to cool 😎
@user-pp1cn2ut4y
@user-pp1cn2ut4y Жыл бұрын
Axper angleren chem xosum ches kara bacatres incha patmum?
@darrenfrancis8126
@darrenfrancis8126 Жыл бұрын
@@spacepowerofficial1187 PLEASE STOP TEACHING imagine
@sanabil2531
@sanabil2531 3 жыл бұрын
you are going to have million subscribers one day, already telling ya, you teach so well :)
@wankhede09
@wankhede09 2 жыл бұрын
I Second that
@CheeseStickzZ
@CheeseStickzZ 2 жыл бұрын
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 жыл бұрын
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
@kerwinso
@kerwinso 2 жыл бұрын
You explain diamond operators (starting at 4:19) in 20 seconds better than others who have taken over 5 minutes. Well done sir.
@shirinelmanson7839
@shirinelmanson7839 3 жыл бұрын
I am literally I am shocked how come you do not have 1 million subscribes ..the way you teach is awsome.
@thecolorblue7427
@thecolorblue7427 2 жыл бұрын
I was not expecting such a easy to understand, and great tutorial like this! thank you so much
@aces8481
@aces8481 2 жыл бұрын
you are 100% my go to person on KZbin for beginner tutorials -> explanations are always really beginner friendly and so clear and easily digestible. Thanks a ton man
@filipemelo1107
@filipemelo1107 2 жыл бұрын
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.
@oldschoolmath8480
@oldschoolmath8480 3 жыл бұрын
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.
@tbone587
@tbone587 2 жыл бұрын
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
@miigon9117
@miigon9117 3 жыл бұрын
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 KZbin!!!
@StephenMoreira
@StephenMoreira Жыл бұрын
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.
@robertjr8205
@robertjr8205 2 ай бұрын
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!
@osanbrazil999
@osanbrazil999 Жыл бұрын
You're the best because you speak fast and get direct to the point with the exact needed amount of information, period.
@gabrielmicillo7763
@gabrielmicillo7763 2 жыл бұрын
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.
@anityyu
@anityyu Жыл бұрын
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
@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!
@tinongsot6267
@tinongsot6267 2 жыл бұрын
This channel is really underrated, I learned a lot just from this video. You’re doing great. Thank you John
@SophoniasT
@SophoniasT Жыл бұрын
My first video and I just want to say that please keep going. This helped me in so many ways. Easy to understand explanation and very helpful interaction. God bless you. You have a subscriber! 🙏🏽👏🏾👏🏾👏🏾👏🏾👏🏾
@akshatmehra3951
@akshatmehra3951 Жыл бұрын
Awesome ! Learning java, coming from c++ and js background. This man has taught so much stuff so easily and quickly. Thanks a ton John !
@danielbressner6125
@danielbressner6125 2 жыл бұрын
Yet another great walkthrough. This channel has been such a huge help in my own Java journey.
@barnabastyav3575
@barnabastyav3575 Жыл бұрын
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
@preciouspearl8583
@preciouspearl8583 Жыл бұрын
Thumbs up i searched so many tutorials but find yours the straight to the point one
@michaelekpo4011
@michaelekpo4011 Жыл бұрын
Thanks Coding with John! One of the best videos I've seen throwing so much light on this subject.
@carlosgranda8493
@carlosgranda8493 2 жыл бұрын
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.
@mk17173n
@mk17173n Жыл бұрын
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.
@eddyvlogss
@eddyvlogss Жыл бұрын
Awesome way of teaching John.. please don't stop teaching at any cost. This really helps a lot of people !! you deserve more subscribers
@masikajenniffer6473
@masikajenniffer6473 2 жыл бұрын
This is amazing.The explanation is really easy to follow and understand. I hope many more people can watch and subscribe. Thanks for the tutorial
@Charnelex
@Charnelex 2 жыл бұрын
John, I'm just getting started in Java and I appreciate you. Commenting to help the algorithm.
@wayneinteressierts9973
@wayneinteressierts9973 11 ай бұрын
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!
@Timeless_Trader
@Timeless_Trader Жыл бұрын
Thanks John. This is a great learning. I would recommend this channel to my friends too because things explained are to the point, no random things. Thanks again. Subscribed
@HuwJones
@HuwJones Жыл бұрын
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.
@ralphgore3543
@ralphgore3543 2 жыл бұрын
John, I discovered you yesterday and you are one of the best!
@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.
@banglepq
@banglepq 2 жыл бұрын
Thank you John so much for this video. It's really helpful for me to understand differences between array and arraylist.
@mastermatt6090
@mastermatt6090 2 ай бұрын
Thanks dude, you make everything so simple!
@vishnuvinod8738
@vishnuvinod8738 2 жыл бұрын
Your are awesome man ❤️ You teach so nice. You are adding every information about the topic into a single video. And also videos are not too lengthy. Loved to watch every videos you posted. Don't stop please.
@CoolBear619
@CoolBear619 4 ай бұрын
Thanks much John! Because of you I have cracked 2 interviews. Loads of love from India. Keep teaching us!🎉
@TornadoeJoe
@TornadoeJoe 2 жыл бұрын
Thanks for the help! Java is an interesting language so far, and this definitely helped me see things a bit better.
@raba650
@raba650 2 жыл бұрын
What a great walkthrough! Really enjoyed it. Now to binge on some more of your videos :)
@anddavinci6691
@anddavinci6691 6 ай бұрын
Thank you so much! I’ve been learning so much faster since I have started watching your videos.
@erickferraz5529
@erickferraz5529 2 жыл бұрын
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.
@matiasmoresi5040
@matiasmoresi5040 Жыл бұрын
Hey John! Thank you very much for taking the time to teach like this
@bbalmer7878
@bbalmer7878 8 ай бұрын
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.
@malodeity
@malodeity 3 ай бұрын
I'll be the first to admit that I've been all over KZbin but you different and you make it so easier to understand. Thanks
@AdrianTregoning
@AdrianTregoning 2 жыл бұрын
Absolute gold. Very well explained! Thank you John.
@mohamedmada4159
@mohamedmada4159 2 жыл бұрын
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
@EnfalOlgun
@EnfalOlgun 4 ай бұрын
What a beautiful explanation. Stunning, absolutely stunning. Thank a lot John.
@fridolinmeier661
@fridolinmeier661 Жыл бұрын
Just searched for a good video and wow I could not have found a better one. Thanks a lot.
@MuniraHersi
@MuniraHersi Жыл бұрын
Thank you so much for all of your videos. You got a new follower, and you are really good at explaining java. Hope to see your channel grow!!!
@AnaCristina-ve7wh
@AnaCristina-ve7wh Ай бұрын
Thanks, you're a great teacher!! It's incredible how you can make it so easy to understand
@sajidamoin771
@sajidamoin771 20 күн бұрын
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 ❤️
@abdullahpopalzai6543
@abdullahpopalzai6543 2 жыл бұрын
Please do not stop teaching, you are great!!!!!!
@charmainemarasigan8994
@charmainemarasigan8994 Жыл бұрын
Superb training. Not boring! Very educational! Highly recommended
@footballplayer3195
@footballplayer3195 10 ай бұрын
you are my hero man, I've been using fixed array my whole life, you're best than my professors in college
@maryozonkwor-ei8vw
@maryozonkwor-ei8vw 2 күн бұрын
Just what i am looking for. And u explain like swift and smooth . Tnx
@alessioharo7995
@alessioharo7995 Жыл бұрын
You're such a great teacher. Thank you for what you do! I love your videos
@AsrorkhanProgrammer
@AsrorkhanProgrammer 2 жыл бұрын
In a simple case, a and very understandable prepared lesson Thank you, John
@jordans3611
@jordans3611 Жыл бұрын
Keep this up man, your videos are helping me so much!
@sdaltnts6774
@sdaltnts6774 3 жыл бұрын
Thank you very much John. You explained clearly. I love your channel.
@lootster
@lootster 10 ай бұрын
KZbin algo sucks for not recommending this wonderful video for Java learner! But better late than never!
@patrykgwardzik4509
@patrykgwardzik4509 Жыл бұрын
Man i just love you so much. This is so clear and understandable.
@Av-fn5wx
@Av-fn5wx 5 ай бұрын
Brilliantly explanation. Clear and concise ❤
@justinbanza4751
@justinbanza4751 2 жыл бұрын
I really appreciated this video. Thanks for all the work to make it!
@daniella9498
@daniella9498 5 ай бұрын
I'm using these videos to prepare for my first year Java course. Thank you so much!
@qararander
@qararander Жыл бұрын
Thanks. Your lessons are great. You simplify matters, you consider students cognition over showing your talent, which you undoubtedly have. Some teachers focus on proving their excellence more than a student’s need, level and ability.
@HatTrick4030
@HatTrick4030 Жыл бұрын
Awesome!! as a refresher I alwasy have to come back and re-study the already-studied topics. Thanks for this great video
@saudaminisawant961
@saudaminisawant961 Ай бұрын
Excellent explanation of concepts ....great John
@javierherrero7011
@javierherrero7011 Жыл бұрын
John, you are an excellent excellent teacher....I have seen many of your Java videos, always learn fast and solid
@s6031417
@s6031417 Жыл бұрын
This video took me only 17 mins to get fully understand the basic concept of Array and ArrayList. Thank you.
@jorgegutierrez2100
@jorgegutierrez2100 2 жыл бұрын
Quality content, great at teaching, quality video and the most important for me is that as a non native English speaker I can perfectly understand everything you're saying. This channel deserves at least 1 million subscribers and hundreds of thousands views. Keep it up, man. 🥂
@nathanelliott9729
@nathanelliott9729 2 жыл бұрын
Thank you so much, I learned more from this video than a 2 hour lecture from my professor.
@PCRduino
@PCRduino 2 жыл бұрын
Brilliant and clear explanation! Thanks!
@valerietremblay3235
@valerietremblay3235 2 жыл бұрын
Thank you so much for these clear & concise videos!
@user-ur3gr2qs6i
@user-ur3gr2qs6i 2 жыл бұрын
Thanks for the videos, they are really easy to follow. Great for review of core concepts as well as an intro for those just learning Java, you and Carl do good work!
@CodingWithJohn
@CodingWithJohn 2 жыл бұрын
I get lots of help from Carl and the cats
@NajmaMiah
@NajmaMiah Жыл бұрын
Great explanation! Thank you. Please keep posting
@kuldeepjoshi1
@kuldeepjoshi1 3 ай бұрын
Great job John!!! Keep it up!
@SkyeVintorez
@SkyeVintorez 2 жыл бұрын
i love all your videos! it helps a lot and explained very well.. please keep on making videos about java..
@moabdellatif5699
@moabdellatif5699 2 жыл бұрын
just perfect and simple, thank you John
@aadi.p4159
@aadi.p4159 3 жыл бұрын
clean precise and too the point.. big ups bro
@nicholi8933
@nicholi8933 Жыл бұрын
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.
@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.
@FelipeGomesProfessor
@FelipeGomesProfessor Жыл бұрын
Great content!! Really easy to understand for a beginner. Thanks!
@laymanshow79
@laymanshow79 Жыл бұрын
Love the practical way you teach
@darthvasilis
@darthvasilis Жыл бұрын
Amazing. In 15 minutes I've learned more from you than I have in 10 weeks from my CSC205 professor...
@williamowusu7778
@williamowusu7778 2 ай бұрын
Very helpful and easy to comprehend
@sambhavkumath
@sambhavkumath Жыл бұрын
thanks for making such an awesome lecture. hoping for more such tutorials
@xiaoxiao717
@xiaoxiao717 3 жыл бұрын
Very clear and detail, it really helps a lot! Will subscribe and hope to see more videos soon!
@pezeng
@pezeng 2 жыл бұрын
Your video was so easy for learning, Please keep doing this. it help me a lot in java learning
@mariacunha8508
@mariacunha8508 2 жыл бұрын
Really enjoying your videos!!! Keep it up!! Thank you!!!!
@rashmikadeshan2710
@rashmikadeshan2710 Жыл бұрын
Thank you so much for making video like this. You explained the difference between arrays and arrylist very clearly .therefore i could understand it. keep up th good work.❤️
@emma98800
@emma98800 2 жыл бұрын
Hey! you are one of the best teachers! Please keep up doing your good work sir!
@minakianrad812
@minakianrad812 Жыл бұрын
Thank you for this AWESOME video of the differences between arrays and arraysList. !!!! You explained it very clearly, down to the point, with great examples!!!! Thank you for making this video and sharing your knowledge and expertise with the world. You are Outstanding! Thanks again! And you also got a new subscriber! 🙂
@saronabi1387
@saronabi1387 Жыл бұрын
Thank you ,thank you, thank youuu, ur courses are so special, so easy to understand the concepts, thank you so much.
@ikromovich_b
@ikromovich_b 2 ай бұрын
you are an awesome man. i got a lot of things from this lesson and thank you for lessons👍
@sebastianyepez6204
@sebastianyepez6204 2 жыл бұрын
Loved the video. Super informative!
@AngaarUriakhil
@AngaarUriakhil 2 жыл бұрын
Thanks. Very clear and easy to understand.
@stephenfoster9009
@stephenfoster9009 Ай бұрын
I’m new to Java and need to learn for my job. Thanks for the videos!
@kocovali7295
@kocovali7295 4 ай бұрын
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!
@alexbrun6863
@alexbrun6863 2 жыл бұрын
Great video! Explains so good.
Set and HashSet in Java - Full Tutorial
20:43
Coding with John
Рет қаралды 191 М.
LinkedList vs ArrayList in Java Tutorial - Which Should You Use?
11:43
Coding with John
Рет қаралды 568 М.
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 64 МЛН
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Рет қаралды 93 МЛН
Giving 1000 Phones Away
00:18
MrBeast
Рет қаралды 24 МЛН
.equals() vs. == in Java - The Real Difference
8:48
Coding with John
Рет қаралды 176 М.
Primitives Data Types In Java - All the Primitives And What They Do
10:24
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 222 М.
New Java Version 22 - The 3 Best New Features You'll ACTUALLY Use
13:15
Coding with John
Рет қаралды 81 М.
Introduction to Arrays and ArrayList in Java
1:45:53
Kunal Kushwaha
Рет қаралды 1,1 МЛН
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1 МЛН
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 695 М.
Exception Handling in Java Tutorial
13:20
Coding with John
Рет қаралды 353 М.
15 crazy new JS framework features you don’t know yet
6:11
Fireship
Рет қаралды 374 М.
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 160 М.
Цифровые песочные часы с AliExpress
0:45
cool watercooled mobile phone radiator #tech #cooler #ytfeed
0:14
Stark Edition
Рет қаралды 6 МЛН
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 1,8 МЛН
МОЖНО ЛИ заряжать AirPods в чехле 🧐😱🧐 #airpods #applewatch #dyson
0:22
Apple_calls РЕПЛИКА №1 В РФ
Рет қаралды 18 М.
XL-Power Best For Audio Call 📞 Mobile 📱
0:42
Tech Official
Рет қаралды 772 М.