If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h
If you have an array with different dimmensions try: for(int i =0; i< array.lenght; i++) { for(int j =0; j< array[0].length; j++) { } } This will go through all values in array that is or isnt square
This is a great tip! Also just in case you have a different number of items in each row, you could improve upon this by checking the length of each row: for (int i = 0; i < array.length; i++) for (int j = 0; j < array[i].length; j++) System.out.println(array[i][j]);
Alex, people like me need your videos! Whenever I am confused about anything or need an explanation I can understand I can always count on you. Please never stop making videos!
I'm using it for an assingment, this really gave me the basis of Nested For Loops. I'm using to create the infamous create words out of phone numbers ie: 2 = ABC, so there is about 2143 different combinations for a 7 digit phone number, and I'm going to use for loops to help with this, I hope. Almost forgot the 2D arrays video also helped in using [ ][ ]{"A", "B", "C"},{"D ", "E ", "F "}, etc. Thank you again!
Man, I really was blown away by this amazing tutorial on nested loops! It's sooo damn good! Also I love how easy you explained how to use it to print 2D arrays. Thank you so so much! 🥰
Great vid! Super helpful! You are awesome! Since you asked, I'm learning about nested for loops because they're one of the key concepts to get your head around if you want to reach a higher level of programming (in my opinion). Furthermore, I would say that nested for loops and nested while loops open up a lot more possibilities - so thanks a lot for this very explanatory video!
i recently start learning java online to get a job, i do have teacher to teach me but i never understand what he is saying till , but the good things i found your videos on youTube and your way to teach is amazing, you are amazing.
Your teaching style is literally very good your videos deserve to be viral in india i tried my best to share your teaching 😊 Little suggestions: take ur course to udemy
I'm using nested for loops for a class assignment. We are given a number of rows and columns. Rows are integers and columns are alphabetical. so the output should list something like this //row1 1A 1B 1C //row2 2A 2B 2C and so on. Pretty difficult for an online class but your videos help a lot. Thanks!
Myself in APCSA class, first time student come from India to US of A, my first teacher Sridhar Kandukari very smart man, he help me now u teach me, very nice sir, vineeth kandukuri also likes ur teachigg always watches video with fav lemon pickle recipe from vah chef
If you do : " System.out.println(ArrayName[i].length); ' before nested loop, It print's out ..I think the Address of the row before printing it's entries !! Which was very helpfu to me, for understanding what it was actually doing!
Turquoise* All secondary colors of light are combinations of the primary colors: Red, Green and Blue. However, the third secondary color of light is Yellow. That's what you get when you combine Green and Red. Color and spelling aside, thank you for taking the time to create these videos and for launching your own coding community. I joined the Discord and found the links there very helpful.
Alex you must be an angel in disguise... Thank you thank you thank you soooo much because I thought that I’d never understand this! I’m really happy right now!!
Thanks for this video! I understand for loops so much better and when I go through an array. Studying for a test and didn't quite understand this portion.
Thank you Alex!, watched so many videos but only understood after your video. It was a great help. Please make videos on Sorting and Searching Algorithms in java. Waiting for those videos.
I'm currently studying at a bootcamp to be a QA Engineer, and we have been learning these during Java Classes. I watch your videos to recap, and It's SUPER beneficial
First thing's first cool video and thanks for the help. We had to use nested for loops to create scenes like 1 12 123 1234 12345 123456 and so on and so forth. I guess this is pretty basic but I also practiced 2d arrays with it.
QOTD... I’m using nested inside nested loops to run a simple word game for kids. I’m still wrapping my head around what I want to accomplish and the logic behind putting together the code to make it happen.
quick question, what is the benefit of doing a 2d array instead of just making a longer normal array? For example, { red, blue, green} {yellow, orange, red} can just be {red, blue, green, yellow, orange, red} and when you want to get an element you can just say colour[2] instead of colour[0] [2].
can you make one more video on Multi-Dimensional Arrays, to be more specific on " HOW TO VISUALIZE A TABLE MADE using 2d Arrays" ; it will be such a relief if i get my doubts clear on that topic please!!
bubble channel for(int i = 0; i < 7;i++){ for(int j = 0; j < i;j++){ System.out.print("*"); } System.out.println(); } Output: * ** *** **** ***** ****** Explanation: outer loops executes until the condition is met(i = 7), The inner loop executes while j is less than i When i = 0 J = 0 Increment i to 1 Now the second time through the loop I = 1 j = 0 0 is less than one so print an * , increment j to 1 and check the condition again 1 isn’t less than 1 so we exit that loop and print an empty space, Now i = 2 J = 0 0 is less than 2 so we print * I is still 2 But now we increment j J = 1 1 is less than 2 so we print another * So far the sequence is * ** J is now incremented to 2 Now we check to see if j < i (2
Anyone just starting this, I found that the best way to organize my code within one file is to create a new method for each video, that way I can scroll down for easy review.
Next time can you please do a video on nested for loop example questions and go through them? It will be very helpful since I've been having trouble in computer science class
Hello Alex ! I can't understand this part: String[][] fancyColors = { { "Red", "Blue", "Green" }, { "Cyan", "Magenta", "Turqiouse" } }; for (int row = 0; row < 2; row++) { for (int column = 0; column < 3; column++) { System.out.println(fancyColors[row][column]); } } Can you explain to me please why in the second loop is "column < 3" and in the forst loop it is "row < 2" ? Because in the both arrays we have 3 elements. Thanks in advance !
Kitchen Table sure! I have videos planned for a few weeks, but I’ll do while loops after that. I can help you now, and I’ll see if I can give you some advice
@@alexlorenlee that would be awesome. I'm basically working on a "guess the number" game for practice, that all runs in a do/while loop. is there some way I can send you the code or something?
Thank you and it is very clear, I just have a question, what if the rows and columns elements were not the same length, when I try it, I get errors with missing output, so how to print it all with no errors?
Is there a order of learning these different types of code, like learn for loops first then do loops, etc? If so then which of your videos should I start with first?
Hi Alex, I like your videos a lot. I'm having a class presentation coming soon, and would like to ask you what recording software you are using? Your videos are all crystal clear and the layout is also nice. Thank you in advance.
If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h
I didn't pay attention in my java class and now this guy saved my life
nice
At least you had a java class, all I have is stupid Pseudo code and a lab.
@@kevinburns8473 nice
@@kevinburns8473 u shuck
@@gamingwithronpubgm3615 yeah no kidding 😂
This guy the GOAT, best tutorials I've seen
🐐
If you have an array with different dimmensions try:
for(int i =0; i< array.lenght; i++) {
for(int j =0; j< array[0].length; j++) {
}
}
This will go through all values in array that is or isnt square
This is a great tip! Also just in case you have a different number of items in each row, you could improve upon this by checking the length of each row:
for (int i = 0; i < array.length; i++)
for (int j = 0; j < array[i].length; j++)
System.out.println(array[i][j]);
Alex, people like me need your videos! Whenever I am confused about anything or need an explanation I can understand I can always count on you. Please never stop making videos!
I had no idea what we were doing in class today, thanks for the help!
nice
This videos are incredible! I cannot understand what my Java teacher says for the life of me but this makes so much sense! Thank you!
I finally understand how Nested For Loop works! Thank You!!!
Good thing i ran to your videos while learning java , the old concept i learned in cpllege are now cleaner, good job Alex.
hey I think u teach better than others , esp in explaining the nested loops topic , listing all i and j
dude i have an exam on nested loops in like 1 hour and you just saved my ass thank you so much
Ah im telling you im gonna fall in love with this guy HAHA
What a life saver hahaahsha thanks man!
I'm using it for an assingment, this really gave me the basis of Nested For Loops. I'm using to create the infamous create words out of phone numbers ie: 2 = ABC, so there is about 2143 different combinations for a 7 digit phone number, and I'm going to use for loops to help with this, I hope. Almost forgot the 2D arrays video also helped in using [ ][ ]{"A", "B", "C"},{"D ", "E ", "F "}, etc. Thank you again!
Man, I really was blown away by this amazing tutorial on nested loops! It's sooo damn good! Also I love how easy you explained how to use it to print 2D arrays.
Thank you so so much! 🥰
Best java tutorials on youtube!!
Great vid! Super helpful! You are awesome!
Since you asked, I'm learning about nested for loops because they're one of the key concepts to get your head around if you want to reach a higher level of programming (in my opinion).
Furthermore, I would say that nested for loops and nested while loops open up a lot more possibilities - so thanks a lot for this very explanatory video!
i recently start learning java online to get a job, i do have teacher to teach me but i never understand what he is saying till , but the good things i found your videos on youTube and your way to teach is amazing, you are amazing.
are you a programmer now?
Thanks for explaining clearly, this nested is so hard for me at starting 2 months at coding. Nested and array are so difficult.
Your teaching style is literally very good your videos deserve to be viral in india i tried my best to share your teaching 😊
Little suggestions: take ur course to udemy
This guy is literally teaching me Java more the paid courses very good explaining and makes everything simple a lot of people owe this guy honestly !!
Good job man one of the best tutorials I've seen
Completed Playlist- Java Basics 2 Good videos thanks Alex!
I absolutely LOVE these! Easy to understand, to the point and helpful. Thanks a lot, Lee!
Thank you so much! It breaks down simple concepts for easier understanding
Wow you deserve so much more views and subs !
I'm using nested for loops for a class assignment. We are given a number of rows and columns. Rows are integers and columns are alphabetical. so the output should list something like this //row1 1A 1B 1C //row2 2A 2B 2C and so on. Pretty difficult for an online class but your videos help a lot. Thanks!
Making for loops to find perfect numbers from 1-10000 First intro programming class this shit helped a lot
Myself in APCSA class, first time student come from India to US of A, my first teacher Sridhar Kandukari very smart man, he help me now u teach me, very nice sir, vineeth kandukuri also likes ur teachigg always watches video with fav lemon pickle recipe from vah chef
nice
This is my first time watching one of your videos, but I have a feeling that I am gonna watch a lot more this year!
you made it so much easier to me to understand and i hope to pass my test with a great mark😩❤️
It's good, easy to understand. Thanks!
Ming Chen I’m happy it helped you!
Dziękujemy za zrobienie tego i innych samouczków java!
thank youuu!!!! 🙇🏻♂️ now it's clear to me how nested for loops are for 2D arrays 😁 thanks a lot!!!! 🖤🖤🖤
Seeing this video for learning purpose. I appreciate your efforts. Keep it UP!!
After watch so many videos, thanks to this one i finally understand it... Thank you!!!
If you do :
" System.out.println(ArrayName[i].length); ' before nested loop,
It print's out ..I think the Address of the row before printing it's entries !! Which was very helpfu to me, for understanding what it was actually doing!
Hey Alex, you're making it a bit too easy.
AND I LIKE IT!!!
Turquoise*
All secondary colors of light are combinations of the primary colors: Red, Green and Blue. However, the third secondary color of light is Yellow. That's what you get when you combine Green and Red.
Color and spelling aside, thank you for taking the time to create these videos and for launching your own coding community. I joined the Discord and found the links there very helpful.
Kustos that’s great thank you!
@@alexlorenlee just remember there's no word in the english language, where the letter U doesnt follow Q ;) (ie: queen, quack, etc.)
@@sabrinakomm750 there are many... //when you play scrabble too much...lol
Thanks bro!!!! I had a lot of confusion but you helped me understand it easily.
just want this dude to know I’m passing ap comp sci because of him
Me too I’ve been winging it for weeks now with no idea how to use for loops thank god for Alex lol
this is very helpful! so happy that i found your channel:)
BATOOL xx I’m glad you found my channel too! Thank you!
Thank you so much for your help! I was using this video to learn how to loop through 2D Arrays.
I can’t say thanks enough ❤️❤️
I know it's a 5 year old video, but for anyone watching now, it's spelled "Turquoise", and if you use intellij, it has an autocorrect feature
I had to check the date on the video when I saw the keyboard he is using
Alex you must be an angel in disguise... Thank you thank you thank you soooo much because I thought that I’d never understand this! I’m really happy right now!!
nice
Your videos are so helpful I learnt oop following your video. Thanks a lot !
simple tutorial ezzzz java , thanx man
Thanks for this video! I understand for loops so much better and when I go through an array. Studying for a test and didn't quite understand this portion.
Eternity Studios great!
Thank you Alex!, watched so many videos but only understood after your video. It was a great help. Please make videos on Sorting and Searching Algorithms in java. Waiting for those videos.
Thank you so much. You are really a awesome teacher.
thank you!!
Best video opening ever!
Thank you Alex! Cool video
and cool music!!!
Thanks man I’m in a AP CSA class and you’re clarifying how this works for me and helping me understand better
I'm currently studying at a bootcamp to be a QA Engineer, and we have been learning these during Java Classes. I watch your videos to recap, and It's SUPER beneficial
Thank you for sharing your knowledge!You are the best!
Got a nested loops quiz tomorrow and this video is teaching me for it 😂
it helped me with my assignment thanku
@ 9:00
Wouldn't it run 36 times since they're(i & j) less than(
_BlueBlazing_ great question! At first glance it looks like it would, but since we set i to 0, it includes 0, totaling to 5 and 10
Thank you lex for the video you shared I learned a lot with your videos especially we are creating chatbot I used some of codes from you
I just like how you use real world examples out there present in the world .... That clears concepts better
First thing's first cool video and thanks for the help. We had to use nested for loops to create scenes like
1
12
123
1234
12345
123456
and so on and so forth. I guess this is pretty basic but I also practiced 2d arrays with it.
QOTD... I’m using nested inside nested loops to run a simple word game for kids. I’m still wrapping my head around what I want to accomplish and the logic behind putting together the code to make it happen.
Thank you for the help! Amazing content!
quick question, what is the benefit of doing a 2d array instead of just making a longer normal array? For example, { red, blue, green} {yellow, orange, red} can just be {red, blue, green, yellow, orange, red} and when you want to get an element you can just say colour[2] instead of colour[0] [2].
can you make one more video on Multi-Dimensional Arrays,
to be more specific on " HOW TO VISUALIZE A TABLE MADE using 2d Arrays" ;
it will be such a relief if i get my doubts clear on that topic
please!!
everything is great .Thank you Alex! I think Length method would be more easier because sometimes we can have a lot of rows and column
I use 'nested for loops' for number patterns in school. If you make a video on it, it'll be pretty cool!
Thanks for the great tutorials!
How would you make a nested for loop for a 2D Array if you do not know the row and column length?
Alex please make a video on pattern program with nested for loops
bubble channel
for(int i = 0; i < 7;i++){
for(int j = 0; j < i;j++){
System.out.print("*");
}
System.out.println();
}
Output:
*
**
***
****
*****
******
Explanation: outer loops executes until the condition is met(i = 7),
The inner loop executes while j is less than i
When i = 0
J = 0
Increment i to 1
Now the second time through the loop
I = 1
j = 0
0 is less than one so print an * , increment j to 1 and check the condition again
1 isn’t less than 1 so we exit that loop and print an empty space,
Now i = 2
J = 0
0 is less than 2 so we print *
I is still 2
But now we increment j
J = 1
1 is less than 2 so we print another *
So far the sequence is
*
**
J is now incremented to 2
Now we check to see if j < i (2
Thanks man, do you have a video on sorting, searching, and recursion
Jairo Poveda not yet, but I probably will in the future
Hey Alex :) In your 2d array - you write for (int i = 0; i < 2 ; i++) - why dont it go out of bounds, seeing that there are only 2 rows? 0 and 1
Anyone just starting this, I found that the best way to organize my code within one file is to create a new method for each video, that way I can scroll down for easy review.
you are A legend
I am learning this in my programming I class.
this is fantastic thank you alex
it was really really good thanx so much :D . that made my day
Next time can you please do a video on nested for loop example questions and go through them? It will be very helpful since I've been having trouble in computer science class
Hello Alex !
I can't understand this part:
String[][] fancyColors = { { "Red", "Blue", "Green" }, { "Cyan", "Magenta", "Turqiouse" } };
for (int row = 0; row < 2; row++) {
for (int column = 0; column < 3; column++) {
System.out.println(fancyColors[row][column]);
}
}
Can you explain to me please why in the second loop is "column < 3" and in the forst loop it is "row < 2" ? Because in the both arrays we have 3 elements. Thanks in advance !
I think it is much easier to explain this using regular array syntax instead of the curly braces shortcut
plz show how to save it and where will be that save code
Thanks Alex
Thank you ,Alex!
I LOVE YOU ALEX !!!!
Hey man, can you make a video on do-while loops? I'm working on a project for sh**s and giggles and cont seem to get the loop to work properly.
Kitchen Table sure! I have videos planned for a few weeks, but I’ll do while loops after that. I can help you now, and I’ll see if I can give you some advice
@@alexlorenlee that would be awesome. I'm basically working on a "guess the number" game for practice, that all runs in a do/while loop. is there some way I can send you the code or something?
Kitchen Table yea! Send it to my email alexlorenlee@gmail.com and I’ll get your code working
To understand more regarding these loops 😁
Very helpful sir.....Sir can you do one where you have to calculate the average of 3 numbers using nested for loop using java coding
What soft application to run the program please tell me anyone .my laptop windows 10
Thank you and it is very clear,
I just have a question, what if the rows and columns elements were not the same length,
when I try it, I get errors with missing output, so how to print it all with no errors?
Hey Alex,
first of all, your tutorials are great! One question, do you recommend any books for java programming?
Thanks in advance :)
Best regards
Java How to Program; Deitel & Deitel
Literally your the best 🙏
Holy shit it's making sense
I just want to say: MARYY MEEEEEEE
no but seriously, thank you so much. you teach java very efficiently
Thanks Alex!
best i like it
Where did you get your keyboard?
turquoise lol. you are a star Alex
Is there a order of learning these different types of code, like learn for loops first then do loops, etc? If so then which of your videos should I start with first?
for loops, while then do while
what
copy and pest !
that the right way you think to learn?
Hi Alex, I like your videos a lot. I'm having a class presentation coming soon, and would like to ask you what recording software you are using? Your videos are all crystal clear and the layout is also nice. Thank you in advance.
Any vid software will work, you need to,set it in 720p and up for better resolution and quality,,but it takes a lot of File size
@@SkyeVintorez Thanks Jefferson, I end up going with OBS.