Тёмный

Java nested loops ➿ 

Bro Code
Подписаться 2,2 млн
Просмотров 86 тыс.
50% 1

Java nested loops tutorial explained
#Java #nested #loops

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 125   
@BroCodez
@BroCodez 4 года назад
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
@wisdomtv360
@wisdomtv360 3 года назад
Thanks for this am wishing for your channel to reach million soon
@armagedon3505
@armagedon3505 2 года назад
for(int i=1; i
@vasykloepexergasia7562
@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
@bee2411 Год назад
😊
@orpyperson6376
@orpyperson6376 2 года назад
I am having trouble understanding nested loops so I will watch this video on repeat until I understand.
@trustoryz8399
@trustoryz8399 5 месяцев назад
practice makes perfect
@annderby6295
@annderby6295 3 года назад
You have the gift of teaching.
@dunnodendedenish
@dunnodendedenish 2 года назад
whats ythe difference between nextLine() and just next (). You have used both for strings?
@FatimaAli-fr4bo
@FatimaAli-fr4bo 2 года назад
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)
@parthbhavsar1659
@parthbhavsar1659 Год назад
@@FatimaAli-fr4bo thanks for the explanation!!
@cristiangarciaperez7230
@cristiangarciaperez7230 2 года назад
quick question, how does it know to print the rows horizontally and the columns vertically?
@cringels9552
@cringels9552 2 года назад
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
@mridulbhattacharjee1866
@mridulbhattacharjee1866 6 месяцев назад
Why was the System.out.println(); in the for loop block so necessary that it's changing the whole output?
@siusomeone873
@siusomeone873 2 месяца назад
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
@treezy97
@treezy97 9 месяцев назад
Dude, you teaching me better than my teacher could!!! Thank you so much!
@rylieRylie-w1w
@rylieRylie-w1w 11 месяцев назад
question why this time you do not need to use println() to clear out the next int still bit confused about
@safetadurakovic2172
@safetadurakovic2172 3 года назад
Hey I copied Everything but it doesn't work it only displays rows
@katekate3246
@katekate3246 3 года назад
Check the print / println
@Curious_Clover
@Curious_Clover 7 месяцев назад
One of the best sample codes I've seen for this series. That's some cool logic you used.
@JuliHoffman
@JuliHoffman 2 года назад
This actually made sense! Thank you!!!
@luke6164
@luke6164 2 года назад
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
@OhMyShad
@OhMyShad Месяц назад
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
@tomtian9622
@tomtian9622 3 года назад
OMG! Where are the captions???
@MueezAhmed5490
@MueezAhmed5490 5 месяцев назад
Publlic class Amazing video(){ }
@shitposting2497
@shitposting2497 2 года назад
My code is being printed vertically
@FFGAMING-dr4dh
@FFGAMING-dr4dh Год назад
Same to do now ??
@ToppShinobi
@ToppShinobi Год назад
You’re doing the lords work bro
@bruaismart8999
@bruaismart8999 8 месяцев назад
Thanks!
@GOODBOY-vt1cf
@GOODBOY-vt1cf 3 года назад
4:25
@ItzTrickshotHD
@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
@xtruezy 10 месяцев назад
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
@nutkimheng7130
@nutkimheng7130 2 месяца назад
This video is very useful! Thank you for make this video bro😃😃😃
@ctluwua7695
@ctluwua7695 3 года назад
BOOM!!!! BEST RU-vidR Deserves the Gold Button
@rafikismayilov4553
@rafikismayilov4553 Год назад
I do follow and watch your tutorials. Perfect and simple explanation. Thank you Bro !!!
@taiai0
@taiai0 6 месяцев назад
'columns cannot be resolved to a variable' how do i fix this?
@patrickpasaje4037
@patrickpasaje4037 3 года назад
"Video 14"
@michaelmaxseiberthuber8419
@michaelmaxseiberthuber8419 3 года назад
loop-ception
@medjl6083
@medjl6083 3 года назад
This is tip and trick for programming language.
@simik4830
@simik4830 15 дней назад
comment for algorithm!!
@zhyakoxalid6892
@zhyakoxalid6892 7 месяцев назад
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
@nikitassouvatzis1928
@nikitassouvatzis1928 2 года назад
Βρόχοι επανάληψης ενσωματωμένοι (nested), μέσα σε άλλους βρόχους επανάληψης.
@davidezimafr
@davidezimafr 6 месяцев назад
This guy is underrated asf!
@alialhussain4139
@alialhussain4139 4 месяца назад
Thanks, Bro 06/01/2024
@mohamedelfadli3125
@mohamedelfadli3125 Год назад
Well done !!!!
@shivaramakrishnacheekati8756
@shivaramakrishnacheekati8756 5 месяцев назад
bro is god level teacher ,who made me understand same concept in 6:00 minutes which i'm struggling to learn for 2 years
@sergiogarcia-di5nj
@sergiogarcia-di5nj 2 года назад
fellow human beings XD lol
@chamith_z1298
@chamith_z1298 2 месяца назад
good bro
@balkhab8165
@balkhab8165 29 дней назад
This guy is really genius, java with this guy is like a piece of cake much love god bless bro
@muhammadmushfiqurrahman1653
@muhammadmushfiqurrahman1653 2 года назад
Hey bro, you are so wonderful.
@hoanginh1437
@hoanginh1437 3 месяца назад
no suitable on this video
@JustNeutral14.
@JustNeutral14. 2 месяца назад
Thx for the tutorial!
@danielmilewski7659
@danielmilewski7659 2 года назад
awesome explonation! thank you!
@ol6131
@ol6131 3 года назад
Best programing guides on youtube
@Giovanni-Rhonim
@Giovanni-Rhonim 8 месяцев назад
God Bless you +12
@Daniel-us1dl
@Daniel-us1dl 3 года назад
You the man
@gamsterilyass2952
@gamsterilyass2952 4 месяца назад
@shivamgaming3559
@shivamgaming3559 5 месяцев назад
😁😁
@dalv8749
@dalv8749 Год назад
System.out.println("Ty Bro");
@SAEID-n4r
@SAEID-n4r Год назад
❤❤❤
@annasun474
@annasun474 2 года назад
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_GAMER
@TUTTU_GAMER 2 года назад
Vazha
@danielmilewski7659
@danielmilewski7659 2 года назад
comment for stats
@Gametimewithsurya
@Gametimewithsurya 2 месяца назад
BRO IS BRO
@pavelkvasnicka6856
@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
@freedom4218
@freedom4218 4 месяца назад
Yeah!
@kristijanlazarev
@kristijanlazarev 7 месяцев назад
wild
@aboyiphilippa1136
@aboyiphilippa1136 6 месяцев назад
Good
@PoorwayTraning
@PoorwayTraning Год назад
thanks
@martinsvanda5874
@martinsvanda5874 Год назад
copying
@NebyuDaniel-j6b
@NebyuDaniel-j6b 27 дней назад
Uhjj
@zari_723
@zari_723 2 года назад
oOoOoOoOo
@azamato
@azamato 2 года назад
14 thx
@MrMorale386
@MrMorale386 3 месяца назад
Bro you're a lifesaver, an actual one. Nice Tutorials
@honoredegg
@honoredegg 2 года назад
Nested loops completely undestood. 14th. Thank you, ma Bro Sensei!
@anlberkearslantas3813
@anlberkearslantas3813 2 года назад
I bought udemy course and got bored now I am watching the same course from you thx bro
@n9583
@n9583 2 года назад
Hey bro code I have a question is this efficient?
@zhyakoxalid6892
@zhyakoxalid6892 7 месяцев назад
danke
@wallstreetbets7741
@wallstreetbets7741 2 года назад
yes, learnt
@trickysachin
@trickysachin 2 года назад
😃
@曾毓哲-b1t
@曾毓哲-b1t Год назад
thank you very much
@tamekkaknuth9612
@tamekkaknuth9612 2 года назад
thanks for your help!!
@Simis999
@Simis999 2 года назад
Bro has the best examples
@kapebreak
@kapebreak Год назад
thanks bro
@ThomasTheThermonuclearBomb
@ThomasTheThermonuclearBomb 2 года назад
Amazing video as always, Bro!
@yeliza2350
@yeliza2350 2 года назад
6 february
@kirillutsenko9306
@kirillutsenko9306 2 года назад
thx for explanation
@bekturasanbekov1979
@bekturasanbekov1979 Год назад
thx 4 vid bro !
@ljaykhan520
@ljaykhan520 8 месяцев назад
Great tutorial
@BakhtimurodPrimov
@BakhtimurodPrimov Год назад
awesome tutorials
@frogheadjon
@frogheadjon Год назад
thank you 😊
@MrLoser-ks2xn
@MrLoser-ks2xn 2 года назад
Thanks
@percivalgebashe4376
@percivalgebashe4376 Год назад
Nice
@greeneggsandmushrooms9855
@greeneggsandmushrooms9855 3 года назад
feed the baby bird
@maciejkaminski8535
@maciejkaminski8535 3 года назад
comment
@matinmonshizadeh
@matinmonshizadeh 3 года назад
thanks bro
@bartomiejsniadach5795
@bartomiejsniadach5795 2 года назад
Thank you Bro
@cesara9747
@cesara9747 2 года назад
thanks, bro!
@nerrixj.l.6102
@nerrixj.l.6102 2 года назад
😍😍😍😍
@mahmoodkanj9078
@mahmoodkanj9078 3 года назад
pop
@huuloc8719
@huuloc8719 2 года назад
Nice.
@omersond4891
@omersond4891 3 года назад
thanks
@Jadeung
@Jadeung 3 года назад
Thanks brooo
@melrovynr.aricayos8534
@melrovynr.aricayos8534 4 года назад
17
@ashish_prajapati_tr
@ashish_prajapati_tr 3 года назад
thank you 😊😊😊
@ahmedsefaw4252
@ahmedsefaw4252 3 года назад
that 's some good shit.
@alyymibeal5485
@alyymibeal5485 3 года назад
Cool Bro, thanks :)
@danny.3036
@danny.3036 3 года назад
Thanks, Bro! ☕
@ghoggaliabdou4222
@ghoggaliabdou4222 3 года назад
Thank you man 💙💙💙💙
@erneztoyo
@erneztoyo 3 года назад
Super video!
@lamias7712
@lamias7712 2 года назад
Merci
@robertraafat413
@robertraafat413 3 года назад
What should I do if I wanna 2 diff. symbols ,like " X & O " !!
@Google_Engineer
@Google_Engineer 3 года назад
Use one more Symbol scanner name.....( like : symbol2 )
@UltraSolarGod
@UltraSolarGod 2 года назад
@@Google_Engineer but how to print it can you give use the code ?? plz _/\_
@nikost2093
@nikost2093 2 года назад
@@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
Далее
Java arrays 🚗
6:26
Просмотров 200 тыс.
For Loop Pattern Program In Java #25
15:49
Просмотров 168 тыс.
МОЮ ТАЧКУ РАЗБИЛИ...!
39:06
Просмотров 428 тыс.
Nested Loops & 2D Arrays | Java | Tutorial 23
13:15
Просмотров 112 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 84 тыс.
Solve Any Pattern Question With This Trick!
57:20
Просмотров 2,4 млн
Java methods 📞
11:05
Просмотров 135 тыс.
Java objects (OOP) ☕
10:46
Просмотров 176 тыс.
Nested Loops in Java
13:44
Просмотров 10 тыс.
How to solve any Star Pattern Program
18:47
Просмотров 1,1 млн
Nested Loops in Java
10:09
Просмотров 277 тыс.
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн