import java.util.Scanner; public class Main { public static void main(String[] args) { // nested loops = a loop inside of a loop Scanner scanner = new Scanner(System.in); int rows; int columns; String symbol = ""; System.out.println("Enter # of rows: "); rows = scanner.nextInt(); System.out.println("Enter # of columns: "); columns = scanner.nextInt(); System.out.println("Enter symbol to use: "); symbol = scanner.next(); for(int i=1; i
@wisdomtv3603 жыл бұрын
Thanks for this am wishing for your channel to reach million soon
@armagedon35052 жыл бұрын
for(int i=1; i
@vasykloepexergasia7562 Жыл бұрын
@@armagedon3505 i guess you already found your answer. still leaving this comment for others to find out. the count starts from 0. hence when the row number will be entered 4, it will count 5. cause 0,1,2,3,4. He wanted the exact number 4. That's why he choose i=1. if you choose i=0, the row number for 4 row will be 3.
@bee2411 Жыл бұрын
😊
@orpyperson63762 жыл бұрын
I am having trouble understanding nested loops so I will watch this video on repeat until I understand.
@trustoryz83998 ай бұрын
practice makes perfect
@annderby62953 жыл бұрын
You have the gift of teaching.
@Curious_Clover9 ай бұрын
One of the best sample codes I've seen for this series. That's some cool logic you used.
@IA.ken0Ай бұрын
I understood the previous videos quickly, so I thought I’d understand nested loops just as easily. Because of that I didn’t pay full attention to Bro’s explanation and ended up not understanding them, After about a week I watched the video again and listened carefully to Bro, and I understood it immediately. Thank you Bro
@treezy9711 ай бұрын
Dude, you teaching me better than my teacher could!!! Thank you so much!
@siusomeone8734 ай бұрын
Great video. A clearer illustration of nested loops is a mechanical clock. The second hand ticks every second. The minute ticks every minute or every 60 ticks or 1 loop of the second hand. The same for the hour hand. A little modification I would suggest is to put the println() to the end instead of the start of the inner loop. for (int i = 1; i
@balkhab81653 ай бұрын
This guy is really genius, java with this guy is like a piece of cake much love god bless bro
@MrMorale3865 ай бұрын
Bro you're a lifesaver, an actual one. Nice Tutorials
@ctluwua76953 жыл бұрын
BOOM!!!! BEST KZbinR Deserves the Gold Button
@shivaramakrishnacheekati87567 ай бұрын
bro is god level teacher ,who made me understand same concept in 6:00 minutes which i'm struggling to learn for 2 years
@davidezimafr8 ай бұрын
This guy is underrated asf!
@rafikismayilov4553 Жыл бұрын
I do follow and watch your tutorials. Perfect and simple explanation. Thank you Bro !!!
@ToppShinobi Жыл бұрын
You’re doing the lords work bro
@anlberkearslantas38132 жыл бұрын
I bought udemy course and got bored now I am watching the same course from you thx bro
@ol61313 жыл бұрын
Best programing guides on youtube
@pavelkvasnicka6856 Жыл бұрын
This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro
@JuliHoffman2 жыл бұрын
This actually made sense! Thank you!!!
@zhyakoxalid68929 ай бұрын
Thank you so much. I don't really understand how the nested loop works, I want to fully understand how the program creates rows and columns. by the next time I see my comment, this should be different. Thanks bro
@nutkimheng71304 ай бұрын
This video is very useful! Thank you for make this video bro😃😃😃
@honoredegg2 жыл бұрын
Nested loops completely undestood. 14th. Thank you, ma Bro Sensei!
@MueezAhmed54908 ай бұрын
Publlic class Amazing video(){ }
@mohamedelfadli3125 Жыл бұрын
Well done !!!!
@BakhtimurodPrimov Жыл бұрын
awesome tutorials
@Simis9992 жыл бұрын
Bro has the best examples
@dunnodendedenish3 жыл бұрын
whats ythe difference between nextLine() and just next (). You have used both for strings?
@FatimaAli-fr4bo2 жыл бұрын
sorry for the late reply but next(); can only be used to input strings but not spaces, so if you want to input a word, you can use next(); nextLine(); can be used to input full lines and more than one word.It can read spaces as well. So, in the video, for example they used next(); to input the symbol as it is only on word(or character)
@parthbhavsar16592 жыл бұрын
@@FatimaAli-fr4bo thanks for the explanation!!
@ljaykhan52010 ай бұрын
Great tutorial
@JustNeutral14.4 ай бұрын
Thx for the tutorial!
@cristiangarciaperez72302 жыл бұрын
quick question, how does it know to print the rows horizontally and the columns vertically?
@cringels95522 жыл бұрын
because at the line System.out.print(symbol); is only a print statement, if you used System.out.println(symbol); it would print them vertically
@GOODBOY-vt1cf3 жыл бұрын
4:25
@danielmilewski76592 жыл бұрын
awesome explonation! thank you!
@rylieRylie-w1w Жыл бұрын
question why this time you do not need to use println() to clear out the next int still bit confused about
@bruaismart899910 ай бұрын
Thanks!
@medjl60834 жыл бұрын
This is tip and trick for programming language.
@luke61642 жыл бұрын
for general use is i the x-axis and j the y-axis would i be right as this would be the same as maths
@ThomasTheThermonuclearBomb2 жыл бұрын
Amazing video as always, Bro!
@ap1136-c4m8 ай бұрын
Good
@mridulbhattacharjee18668 ай бұрын
Why was the System.out.println(); in the for loop block so necessary that it's changing the whole output?
@ОлександрОстріщенкоАй бұрын
its makes colums go under
@percivalgebashe4376 Жыл бұрын
Nice
@OhMyShad4 ай бұрын
My question is: "Why the inner for loop variable "j" resets every "i" variable update but i keep growing till the condition is false (i
@chamith_z12984 ай бұрын
good bro
@kirillutsenko93062 жыл бұрын
thx for explanation
@tamekkaknuth96122 жыл бұрын
thanks for your help!!
@muhammadmushfiqurrahman16533 жыл бұрын
Hey bro, you are so wonderful.
@曾毓哲-b1t Жыл бұрын
thank you very much
@nikitassouvatzis19282 жыл бұрын
Βρόχοι επανάληψης ενσωματωμένοι (nested), μέσα σε άλλους βρόχους επανάληψης.
@erneztoyo3 жыл бұрын
Super video!
@bekturasanbekov1979 Жыл бұрын
thx 4 vid bro !
@ItzTrickshotHD Жыл бұрын
How does this work? I can only imagine rows and columns leave an empty space in relation to user input. Thereafter the symbol can take the shape left by the user input. However, how does tha machine know that after the first row that we dont only want the first row to have 5 symbols? But it continuously does that downwards? Btw when we enter our number for the condition of "print" does this make and count space horizontally while the "println" counts and makes space vertically?
@xtruezy Жыл бұрын
print does not create a new line so thats why it goes horizontal. As per your other question, the machine knows this because of the system.out.println so the machine first puts in the amount of the symbol you want per line then it creates another row(line) and simply does it over and over again until loop is finished
@danny.30363 жыл бұрын
Thanks, Bro! ☕
@frogheadjon2 жыл бұрын
thank you 😊
@ghoggaliabdou42223 жыл бұрын
Thank you man 💙💙💙💙
@huuloc87193 жыл бұрын
Nice.
@NextRH-p7t2 жыл бұрын
0:04 i find out that "nested loop work in java" u say is kinda like melody here XD
@bartomiejsniadach57952 жыл бұрын
Thank you Bro
@ashish_prajapati_tr3 жыл бұрын
thank you 😊😊😊
@cesara97473 жыл бұрын
thanks, bro!
@Daniel-us1dl3 жыл бұрын
You the man
@matinmonshizadeh3 жыл бұрын
thanks bro
@ОлександрОстріщенкоАй бұрын
how can i make it with boolean for example
@alyymibeal54853 жыл бұрын
Cool Bro, thanks :)
@tomtian96223 жыл бұрын
OMG! Where are the captions???
@sairos40572 жыл бұрын
ty bro
@michaelmaxseiberthuber84193 жыл бұрын
loop-ception
@MrLoser-ks2xn2 жыл бұрын
Thanks
@Jadeung3 жыл бұрын
Thanks brooo
@taiai08 ай бұрын
'columns cannot be resolved to a variable' how do i fix this?
@safetadurakovic21723 жыл бұрын
Hey I copied Everything but it doesn't work it only displays rows
@katekate32463 жыл бұрын
Check the print / println
@annasun4742 жыл бұрын
Why we do no put a scanner.nextLine(); after rows = scanner.nextInt(); and columns = scanner.nextInt(); . Since scanner.nextInt() can only read integer and it won't escape the line, I am confused.
@TUTTU_GAMER2 жыл бұрын
Vazha
@YuliannCastañedaАй бұрын
👌
@lamias77123 жыл бұрын
Merci
@omersond48913 жыл бұрын
thanks
@alialhussain41396 ай бұрын
Thanks, Bro 06/01/2024
@SAEID-n4r Жыл бұрын
❤❤❤
@robertraafat4133 жыл бұрын
What should I do if I wanna 2 diff. symbols ,like " X & O " !!
@Google_Engineer3 жыл бұрын
Use one more Symbol scanner name.....( like : symbol2 )
@UltraSolarGod2 жыл бұрын
@@Google_Engineer but how to print it can you give use the code ?? plz _/\_
@nikost20932 жыл бұрын
@@UltraSolarGod Scanner scanner = new Scanner(System.in); int rows; int columns; String symbol1 = ""; String symbol2 = ""; System.out.println("Enter # of rows: "); rows = scanner.nextInt(); System.out.println("Enter # of columns: "); columns = scanner.nextInt(); System.out.println("Enter first symbol to use: "); symbol1 = scanner.next(); System.out.println("Enter second symbol to use: "); symbol2 = scanner.next(); for(int i=1; i