How to accept user input in Java ⌨️【8 minutes】

  Рет қаралды 217,394

Bro Code

Bro Code

Күн бұрын

Пікірлер: 275
@simrangill5830
@simrangill5830 3 жыл бұрын
You are the best teacher ever
@doronfeldman5152
@doronfeldman5152 10 ай бұрын
Agree
@bolitupac9312
@bolitupac9312 4 ай бұрын
Agree
@DANNZIU-kv2sc
@DANNZIU-kv2sc 4 ай бұрын
Agree
@CommunityCoded
@CommunityCoded 2 ай бұрын
Agree
@WaynePowersYT
@WaynePowersYT Ай бұрын
Agree
@davidbolduc4378
@davidbolduc4378 3 жыл бұрын
This channel is the best thing to happen to my GPA since Chegg
@pastel1213
@pastel1213 3 жыл бұрын
This is incredible bro, can't believe that not a lot of people watch this. That is the way to teach people! Keep it up! Love your videos
@MariaZarinaKay
@MariaZarinaKay 2 ай бұрын
Yeah!!!!!!!!!!!!!!!!!!!!!!!
@JuliHoffman
@JuliHoffman 2 жыл бұрын
That broke down the WHY of scanners for me, rather than "because that's just the way it is." Thank you!
@meng-junglee9071
@meng-junglee9071 2 жыл бұрын
Bro you have no idea how long it took me to wonder why I couldn't enter any input with the nextLine after nextInt. You are awesome!!
@1jokerpro780
@1jokerpro780 3 жыл бұрын
for strings , when using scanner , its better to use .next(); instead of .nextLine(); to avoid that error , that worked for me at least . and i have to say , great video , thanks for the efforts . this is by far the most beginner friendly , right to the point , including tricks and errors tutorial. i sincerely thank you bro hahahaha
@stephaniehernandez3641
@stephaniehernandez3641 3 жыл бұрын
Thank you!!! I took a note of this :)
@paia6447
@paia6447 2 жыл бұрын
Next() keyword won't be able to print the whole text, for like name and tittle at the same time
@ayansiddiqui7383
@ayansiddiqui7383 2 жыл бұрын
Thanks , it helped a lot
@cubebrick7019
@cubebrick7019 2 жыл бұрын
helped me thanks
@sairos4057
@sairos4057 2 жыл бұрын
If you use ".next();" instead of ".nextLine();", It will be not possible to type more than one word Example: Joker - works fine Joker pro - error
@BroCodez
@BroCodez 4 жыл бұрын
// It's good practice to close your scanner when you are done using it. scanner.close(); // I forgot to. So I didn't import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("What is your name? "); String name = scanner.nextLine(); System.out.println("How old are you? "); int age = scanner.nextInt(); scanner.nextLine(); System.out.println("What is your favorite food?"); String food = scanner.nextLine(); System.out.println("Hello "+name); System.out.println("You are "+age+" years old"); System.out.println("You like "+food); scanner.close(); } }
@nairaac
@nairaac 4 жыл бұрын
thanks for giving it in the comments! also mine kept on saying error on the first line.
@CS_CHILD
@CS_CHILD 11 ай бұрын
Umm....I'm having a problem here please It says error..system cannot be resolved to a variable
@Elvin-ne6qq
@Elvin-ne6qq Жыл бұрын
I just discovered your channel, your way of explaining things without too much fuss and in an easy way is amazing, greetings from Honduras and thanks a lot👻.
@cristalpineda4178
@cristalpineda4178 3 жыл бұрын
May God bless you, its has been hard since I started college. Now I can Understand better!!!
@sarthak3401
@sarthak3401 11 ай бұрын
Just started this course...super excited to finish it ❤😊
@mailiesathare
@mailiesathare 2 жыл бұрын
I like how you tackled the newline character stuck in the buffer integrated concept (I would still call it an error). I was taught that the buffer needed to be cleared, and I still do not know how to visualize a buffer.
@BahaaMaleb
@BahaaMaleb 8 ай бұрын
if this guy isn't the best teacher in the world idk who is LOVE YOU 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
@deepthakur14916
@deepthakur14916 Жыл бұрын
Using this series alongside with my uni course , love u bro 👊
@ratnaverma2661
@ratnaverma2661 Жыл бұрын
Hey Bro! I am from India and only your tutorials helped me learn programming even my main language didn't help, Thanks a lot, I am a kid btw
@kubapawowski7035
@kubapawowski7035 4 ай бұрын
This tutorial is fantastic! The explanations are clear and concise, making it easy to follow along. I've been struggling with understanding [specific programming concept], but your examples really helped clarify things. Thank you for breaking down complex topics into manageable steps. Looking forward to more videos like this!
@danrobinlibunao4475
@danrobinlibunao4475 2 жыл бұрын
eyyy new bro here, I had been dealing with a lot of difficulties on understanding Java and thanks to you it gave me a on point lesson to different difficulties. Keep it up bro I know that you can help more beginner like me.
@zxnnightstalker2289
@zxnnightstalker2289 4 жыл бұрын
I hope you will get more than 1M views each time you uploaded a new video after one day, in the future.
@unalysuf
@unalysuf Жыл бұрын
Your explanations and examples is very clean and easy to learn. Thank you so much for your effort
@TewodrosGetnet-ut6km
@TewodrosGetnet-ut6km 18 күн бұрын
Bro you use 1% of your knowledge and 99% of your talent to lecture. In one or other way you are the bestest one
@anamika_deb
@anamika_deb 3 жыл бұрын
Finally, get this tutorial that explained this error clearly
@muzzammilsabuwala2398
@muzzammilsabuwala2398 2 жыл бұрын
Bro really you made it so easy for me Thanks a lot for that bro Whenever I get stuck I come to your channel and as always I return with a great happy feeling and also with understanding the concept ❤❤❤❤❤❤❤❤❤❤❤❤❤❤
@PaulLein-t9m
@PaulLein-t9m Жыл бұрын
Great explanation of the mysterious behavior of the Scanner class.
@joshuaasukwo
@joshuaasukwo Жыл бұрын
For the first time my code executes without error!! # Thank you so much sir, I love your pattern of writing codes so simple ...
@LincyMcGabby
@LincyMcGabby 8 ай бұрын
You made it so simple & super easy to understand. Thank you
@ilgar.mp4
@ilgar.mp4 Жыл бұрын
Short ☑️ Useful ☑️ Practical ☑️ Life Changing ☑️
@bobfarker4001
@bobfarker4001 Жыл бұрын
The shia Labeouf "Just do it" icon made me subscribe. Thanks bro
@doronfeldman5152
@doronfeldman5152 10 ай бұрын
You are the best programming channel!
@maddinluv3122
@maddinluv3122 Ай бұрын
this is what i did on my own after watching import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner x = new Scanner(System.in); System.out.println("Whats your name?"); String name = x.nextLine(); System.out.println("Whats your age?"); int agr = x.nextInt(); x.nextLine(); System.out.println("Whats your favourite food"); String food = x.nextLine(); System.out.println("Hello "+ name); System.out.println("You are " + agr + " yrs old"); System.out.println("Your favourite food is "+ food); } } its a little confusing since its not as user friendly as pyton and java but your videos help quite a bit.
@JustNeutral14.
@JustNeutral14. 5 ай бұрын
Great tutorial. I like seeing how much java differs from python, which is the tutorial language I learned in school.
@eboylydz1148
@eboylydz1148 2 жыл бұрын
this is a comprehensive explanation
@medjl6083
@medjl6083 4 жыл бұрын
Very important video of Java for input data by user with keyboard.
@jesterfield5034
@jesterfield5034 7 ай бұрын
Thank you so much for this playlist! I'm currently reviewing for our Algorithms class, bro and I totally forgot about it all 😭😭😭
@nikitassouvatzis1928
@nikitassouvatzis1928 3 жыл бұрын
Αυτό είναι ένα σχόλιο για το συγκεκριμένο βίντεο. Τι αλγόριθμος και πράσινα άλογα... Αφού ήρθαν οι Έλληνες μη φοβάσαι Bro, η επιτυχία είναι δεδομένη.
@-omarabusnineh5174
@-omarabusnineh5174 3 жыл бұрын
I'm from Jordan, thank's u Bro code u'r professional
@reynanlamsen2007
@reynanlamsen2007 4 ай бұрын
I miss C so much 😭
@DANNZIU-kv2sc
@DANNZIU-kv2sc 4 ай бұрын
Dude your tutorials are the best
@UnknownPerson-t7p
@UnknownPerson-t7p 9 ай бұрын
Man! You saved my java project! Thank you!
@ajaydalvi1378
@ajaydalvi1378 Жыл бұрын
Thanks, Bro!! /n explanation was what I was looking for throughout the youtube
@venkat2217
@venkat2217 2 жыл бұрын
Excellent Bro ♥️ , You've earned a couple of subscribers!
@soapeated
@soapeated 2 ай бұрын
You are a life saver THANK YOU
@suleimandiveriosallum3756
@suleimandiveriosallum3756 3 жыл бұрын
Jesus, you are the best man! I discover your channel today!
@viperproduction6454
@viperproduction6454 3 жыл бұрын
Nice and smoothly explained
@Techtinkerer3D
@Techtinkerer3D 3 ай бұрын
Bro is the realest of all bros
@calm_bloomer1219
@calm_bloomer1219 6 ай бұрын
Thank you for giving us such a great learning material !:)
@ihssanenedjaoui1444
@ihssanenedjaoui1444 9 ай бұрын
your videos ara just incredible
@pushankarmakar1783
@pushankarmakar1783 Жыл бұрын
best java course!
@stanislawunruh9082
@stanislawunruh9082 3 жыл бұрын
Love your style bro!
@Anees-qf8so
@Anees-qf8so Жыл бұрын
you are a true gigaChad programmer bro!!!
@RahmatullahVahdatWithCod-pl2vh
@RahmatullahVahdatWithCod-pl2vh 4 ай бұрын
wow brother wow very good realy
@huseinrahiym463
@huseinrahiym463 4 жыл бұрын
Look at the thumbnail though!!😂😂😂😂
@thelastmuslimsamurai3109
@thelastmuslimsamurai3109 2 жыл бұрын
Bro is always here for me. Thank you Bro ❤️❤️❤️
@alexandrulolea4631
@alexandrulolea4631 Жыл бұрын
Thank you for the great video! Keep up the good work!
@RandomUser_543
@RandomUser_543 2 жыл бұрын
your videos are so useful, thank you
@marcinzale
@marcinzale 4 жыл бұрын
Great tutorial! Thanks!
@alifaizi6996
@alifaizi6996 2 жыл бұрын
You are simply great, Bro!
@wallstreetbets7741
@wallstreetbets7741 2 жыл бұрын
thank for teaching. I learnt from you
@souleaterboss2246
@souleaterboss2246 6 ай бұрын
a perfect reviewr ty my dude
@dr.oswald5400
@dr.oswald5400 3 жыл бұрын
Thanks for the help on java, I was using a school computer so I couldn't like or comment. I'm doing that now.
@bartomiejsniadach5795
@bartomiejsniadach5795 2 жыл бұрын
Another lesson that i understood
@jaylordjl6337
@jaylordjl6337 2 жыл бұрын
Sometimes it does not work or maybe i just missing something in my code after i implement the nextLine() method to eat some extra white space; but yeah its very helpful, Thanks bro
@tallapragadamadhaviramalak4540
@tallapragadamadhaviramalak4540 Жыл бұрын
Hey Bro,I have a question from my school I have an image where can I send the image?Please clarify my doubt of menu based programs🙏
@sharkington7007
@sharkington7007 3 ай бұрын
Excuse me, Mr. Bro. Great tutorials you have here, but could you please make more videos about using pygame? I think it would be fun for people who have mastered Python or at least have an intermediate knowledge of the language. Thank you.
@SirKingCAT
@SirKingCAT 2 жыл бұрын
Very easy to understand. Thank you :)
@animeforever8508
@animeforever8508 Жыл бұрын
This is epiccccccccccccccccccccccc loving this.............
@thisisbrewsworld
@thisisbrewsworld 2 жыл бұрын
You are amazing bro. Thank you so much
@alexeybudkovskiy
@alexeybudkovskiy Жыл бұрын
Thanks Bro for a great lesson!
@RuthWondwossen
@RuthWondwossen Жыл бұрын
Da best bro in Da entire world
@elkhanmammadli6267
@elkhanmammadli6267 Жыл бұрын
You are the best bro !!
@cesara9747
@cesara9747 2 жыл бұрын
a lot of prayers to the algorithm!
@icm0320
@icm0320 8 ай бұрын
Great tutirial ever !!!!!
@ap1136-c4m
@ap1136-c4m 8 ай бұрын
found it very helpful
@likeafallen2620
@likeafallen2620 Жыл бұрын
Super as usually!!
@dogowo
@dogowo 2 жыл бұрын
incredible video, thank you bro
@WorkSmarter__
@WorkSmarter__ 3 жыл бұрын
Scanner scanner = new Scanner(System.in); -> you could have explained why System.in is passed here. Anyway your tutorials are awesome
6 ай бұрын
Binge watching this channel till I make it as a software developer.
@beksaylor
@beksaylor 2 жыл бұрын
I just love your voice, @Bro Code !!
@iuliannita3620
@iuliannita3620 4 жыл бұрын
bro, i watched ur java tutorial (10, 4 hours) and all i learnt its "its ur bro...ladies and gentlemans" ha ha , jk i liked ur video... and Corvette
@fizykanaty1346
@fizykanaty1346 Жыл бұрын
Great video , thanks for the efforts !!!
@mahdirahman9970
@mahdirahman9970 9 ай бұрын
We can also use String food =sc.next(); so that the code doesnt skip that question right?
@MoabiSehapi
@MoabiSehapi Жыл бұрын
It was helpful thanks❤
@dawidbudkiewicz4509
@dawidbudkiewicz4509 Жыл бұрын
Great tutorial bro
@ryannayak5797
@ryannayak5797 4 жыл бұрын
great video bro!!
@NAVEENBENIWAL
@NAVEENBENIWAL 3 жыл бұрын
Got an error saying "scanner can not be resolved to a type"☹️ What should I do
@Adam-hz6wk
@Adam-hz6wk 2 жыл бұрын
If you still need this, try put scanner without the capital "S" Like: Scanner scanner = new Scanner(System.in); Not Scanner Scanner = new Scanner.....
@ratnaverma2661
@ratnaverma2661 Жыл бұрын
​@@Adam-hz6wk is right, my friend got the same error
@shanksshaki
@shanksshaki Жыл бұрын
this easy learn thanks of course !!!
@Zacharydvd
@Zacharydvd 3 жыл бұрын
Great Video, Bro!
@joshuaraymond4996
@joshuaraymond4996 2 жыл бұрын
Thanks. good class
@711mobiles
@711mobiles 4 жыл бұрын
Please make a video on Snake Game and tell us why you make 3 different classes? Why you're putting all details of code in only gamepanel class?
@omersond4891
@omersond4891 3 жыл бұрын
you deserved M views for every video
@ananthan_sreekumar
@ananthan_sreekumar 11 ай бұрын
thanks for this tutorial bro
@mathlee12344
@mathlee12344 3 жыл бұрын
I tried to make a yes -no question using boolean as a variable but I faild how can I do it
@joshbenjamin1100
@joshbenjamin1100 2 жыл бұрын
Great video! One question. I made a program that has an IF/ELSE statement in it, so depending on the user's input of age, it goes to one or the other. The program continues to ask questions and receive input if the user's input leads to the ELSE statement, but if it leads to the IF (i.e., the statement before the ELSE) statement, it stops taking input. Any idea why?
@legendtenzy597
@legendtenzy597 Ай бұрын
good explanation bro
@montiito973
@montiito973 2 ай бұрын
How they put the characters (transparent looking) that disappear when u click in the input box.
@kirillutsenko9306
@kirillutsenko9306 2 жыл бұрын
good lesson, bro
@furiman
@furiman Жыл бұрын
Is there any reason to use the int age = scanner.nextInt(); scanner.nextLine(); method instead of: System.out.println("How old are you? "); int age = Integer.parseInt(scanner.nextLine());This will remove the need for scanner.nextLine(); as the scanner will convert the string to integer and still give us next line and pause so we can fill the rest of the input.
@ibrahimylmaz8378
@ibrahimylmaz8378 2 жыл бұрын
you are amazing!
@geeteshmalik4023
@geeteshmalik4023 6 ай бұрын
I have a quick question..... In the start we write " import java.util.Scanner;" but we can also write " import java.util.*;" Can anyone tell the difference between them........................ And i have another question...... Instead of writing the "scanner.nextLine();" after age can't we just write "scanner.next();" instead of "scanner.nextLine();" everywhere. Does it have any effect on the bigger codes or it is safe to write like this?????
@MrShadow1137
@MrShadow1137 2 жыл бұрын
Hey bro really love your videos! I just have a question, I think there's a small mistake at 4:28 or at least something that i couldn't get - so you said that this common problem happens if you use .nextLine after .nextint or anything else that's not .nextLine, but how is that possible since if you add .nextLine it does cause a problem? and i assume you do answer what you can add after .nextint I just didn't get there. Thank you very much in advance!
@muimeko2774
@muimeko2774 Жыл бұрын
He said the problem exist if you use nextInt or anything else that isn't nextLine, not the opposite.
@crisnelacristiano2835
@crisnelacristiano2835 Жыл бұрын
@BroCode how can I save users' information to textfile?
arithmetic expressions in Java 🧮【4 minutes】
4:31
Bro Code
Рет қаралды 109 М.
Java methods 📞
11:05
Bro Code
Рет қаралды 149 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 126 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 7 МЛН
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 22 МЛН
How Do We Get User Input in Java? - Full Tutorial
16:26
Coding with John
Рет қаралды 41 М.
#83 User Input using BufferedReader and Scanner in Java
11:48
Java for the Haters in 100 Seconds
2:22
Fireship
Рет қаралды 2,9 МЛН
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Learn Java in 15 Minutes (seriously)
19:50
ForrestKnight
Рет қаралды 128 М.
Java Scanner Tutorial #14
12:37
Alex Lee
Рет қаралды 366 М.
Variables in Java ✘【12 minutes】
12:32
Bro Code
Рет қаралды 223 М.
Why MOST Developer Portfolios are Worthless
12:50
Travis Media
Рет қаралды 18 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 918 М.
Java constructors 👷
10:37
Bro Code
Рет қаралды 196 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 126 МЛН