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
Worth to say that you can also use another method instead of using: quote += scan.nextLine(); you can also just type: scan.nextLine(); after previous int age = scan.nextInt(); Also good idea is to use seperate method as: public int getInt() { int number = scan.nextInt(); scan.nextLine(); return number; } and just type for example: int numer = getInt(); Overall great tutorial, im very new to programming myself so will use your videos for sure.
Bro I gotta let you know how much your videos helped me out this semester, the language barrier with my professor made it really difficult to understand things and class, but actually learning a lot more here than in class 😅, but anyway thanks bro your really going save me this semester
As a current BSIT college student today, this tutorial is clear and easy to understand and that's why I learn more than the actual teaching of our professor, I wish that they can do like this tutorial than doing it in a first run without acknowledging the students if they really understand it. Overall this video is very helpful and I hope I learn more in this channel even though this one is 5 years old and still helpful. Thank you for this Alex Lee!
I know python and finding it really hard to get into java for like couple of years and then i quit on java because there was no resources to learn as easy as it is in python. Then this dude came in, man i do not appreciate anyone because of my ego but u dude u killing it. Your “learn java in 14 minutes” video popped in my feed i watched it with a mindset that how much an idiot one can be who is teaching java in 14 minutes. I watched and kinda liked it. Now here i am watching full course of videos and learning java. U nailed it man. Loved it and I appreciate how easy you made it to understand. I am learning java again and finally i feel i will do a careeer switch into java , thanks to u man
im lowkey crying because of how good you explained this, my teacher left it out and said do it on your own, at first i was very scared and wanted to skip it and not do it but then i came across your video and ive never understood anything better than ive undertood this, thank you so muchh!!
I don't use JAVA for absolute anything but i came hearn to learn it from time to time just because u are awesome teatcher. srsly. Planning on put your voice on a Lo-fi beat atm.
Why was that so much harder for my professor and boss to explain but this makes it seem like it’s kindergarten easy! Thanks so much for breaking it down Barney style! I learned in 12 minutes what I couldn’t for a whole day! Thanks 🙏🏼
School from home is hard, because sometimes we are having trouble with internet connection and I cant often understand my instructor. What I do is I go to your youtube channel and I undertand your video really well and it helps me to answer my profs activities. Thank you so much!!!
Hey Alex, I just started in college. I'm doing a Diploma in Network Systems and one of my modules is Java Programming. All my lessons are on ColCampus so I can't physically interact with my educators which is really a challenge, they don't make content as easily understandable as you do, I find myself very frustrated at times not understanding what to do, however I find your content really helpful. Thank you so much.
thank you so much! this is my first year in computer science and my professor doesn't upload any lecture notes to our school's website. I was hopeless about studying before I found your channel.
Thank you for this video. I'm currently taking Java Programming for my online class and it's online only. I work full time and am a college student full time so I have little time to study and fully take it in. I haven't fully read Scanner and was a little confused from it (if I had more time I would fully understand) but being able to watch your video and get a better explanation helped me understand it better. Thank you
You have excellent teaching skills. Glad I found your channel. While others simply explain what to use and what the result is, you explain why to use it, and thus makes perfect sense in one's head. Thank you!!
Thanks Alex. Your explanation is top notch. Before now I wanted to skip that scanner sh*t but I could now play around with it. Thank you. AC from Nigeria
Man, you really deserve to have over million subscribers. I like your teachings && I hope in the future I'll become like you! Thanks for the teachings! :)
Thankyou sir. I liked the way to teach very detailed and its good that you do recap to make sure every line is clear. Thanks from a student of firstyear college from philippines
I had six epiphanies in the first four minutes of this video, thank you for teaching me in 12 minutes what my prof couldn't teach me in two weeks of classes!
Alex you are Awesome man!! thank you so much for your videos. i am studying java on a well known site and it is good but i always check youtube videos and you are very consistent on making java Understandable! thanks so much for what you do for us inspiring to get into programming.
Thank you Alex this video really help to write my first program as beginner package contitionalstatmentsloop; import java.util.Scanner; public class Scannerexp { public static void main(String[] args) { Scanner scan=new Scanner (System.in); System.out.println("inter your first name"); String name=scan.next(); System.out.println("inter your subject"); String subject=scan.next(); System.out.println("inter your exam score"); int examscore= scan.nextInt(); if (examscore >= 90 ) { System.out.println("your Pass and your grade A"); } else if (examscore>=80) { System.out.println("your pass and your grade is B");
} else { System.out.println("your field "); }
System.out.println("Thank you "+" "+name+" "+"yours are subject is = "+ ""+subject+ " "+"your result"+" "+examscore); } }
In Eclipse, use Ctrl-Space when you have typed Scan, and you will get expansion and also imported Scanner in one go. I usually have System.out.print() and not println() to print prompt for telling the user what to enter. Scanner should also be closed before the program exits, which could be done with try-resource. try (Scanner in = new Scanner(System.in)) { String name = in.next(): int age = in.nextInt(); } And you should probably use printf() instead of println()/print() when printing out values. As you have way better control of formating the output. I love how you solve the problem with mixing next() and nextLine(); I will take that with me.
Thanks a lot for this tutorial! Java Software Solutions by Lewis and Loftus was really confusing when explaining scanners (Chapter 2.6). You made it so much easier to understand!
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
This helped me really understand the Scanner Class better. I know this is a 4 year old video but it really helped a lot. Thank you
Yeah bro
Fr
Alex you're amazing at explaining these things, thanks for helping me understand those basic topics!
Worth to say that you can also use another method instead of using: quote += scan.nextLine(); you can also just type: scan.nextLine(); after previous int age = scan.nextInt();
Also good idea is to use seperate method as:
public int getInt() {
int number = scan.nextInt();
scan.nextLine();
return number;
}
and just type for example:
int numer = getInt();
Overall great tutorial, im very new to programming myself so will use your videos for sure.
dude i was having problems with my paper on passing scanners as perimeters thank you very much!
Bro I gotta let you know how much your videos helped me out this semester, the language barrier with my professor made it really difficult to understand things and class, but actually learning a lot more here than in class 😅, but anyway thanks bro your really going save me this semester
As a current BSIT college student today, this tutorial is clear and easy to understand and that's why I learn more than the actual teaching of our professor, I wish that they can do like this tutorial than doing it in a first run without acknowledging the students if they really understand it. Overall this video is very helpful and I hope I learn more in this channel even though this one is 5 years old and still helpful. Thank you for this Alex Lee!
This man is a savior I was struggling in my AP class cause I couldn’t code the scanner correctly but now I get it
I know python and finding it really hard to get into java for like couple of years and then i quit on java because there was no resources to learn as easy as it is in python. Then this dude came in, man i do not appreciate anyone because of my ego but u dude u killing it. Your “learn java in 14 minutes” video popped in my feed i watched it with a mindset that how much an idiot one can be who is teaching java in 14 minutes. I watched and kinda liked it. Now here i am watching full course of videos and learning java. U nailed it man. Loved it and I appreciate how easy you made it to understand. I am learning java again and finally i feel i will do a careeer switch into java , thanks to u man
im lowkey crying because of how good you explained this, my teacher left it out and said do it on your own, at first i was very scared and wanted to skip it and not do it but then i came across your video and ive never understood anything better than ive undertood this, thank you so muchh!!
I always used scanner lol but never truly understood what I was doing when I thought about it.
now its crystal clear
System.out.println("thankyou sir");
Why println
@@peacequest2 ln is short for line, so the linputed line will be printed which is 'thank you sir'
@@peacequest2 to break line
@@Steven-ke2ss hlo
@@ishworghimire3017 yeah i know thx
I don't use JAVA for absolute anything but i came hearn to learn it from time to time just because u are awesome teatcher. srsly.
Planning on put your voice on a Lo-fi beat atm.
thank you so much. java is so much harder for me than python and this is the only resource getting me through my classes
You are a true savior. I was really confused and you explained everything to me. God bless you.
YOU helped my pass my final! Thank you for being so in depth, yet simple! Best tutorial vids!
That’s awesome great job! Thanks!
*me
What is Resource leak "sc" please make this topic video please
I have been struggling with java so much. thanks a lot for your videos
Why was that so much harder for my professor and boss to explain but this makes it seem like it’s kindergarten easy!
Thanks so much for breaking it down Barney style! I learned in 12 minutes what I couldn’t for a whole day! Thanks 🙏🏼
The beginning is so true:"if you like me, you may not have had a great java teacher"!. So true, SO TRUE!!!
I just learned more two minutes into your video than a whole week in class. Thanks!
School from home is hard, because sometimes we are having trouble with internet connection and I cant often understand my instructor. What I do is I go to your youtube channel and I undertand your video really well and it helps me to answer my profs activities. Thank you so much!!!
You explain every topic really well , it is easy to understand and i find myself going back to your channel eveyday to learn something new
Thank you so much now i know a little about Scanner and i hope i understand encoding and be better.
Hey Alex, I just started in college. I'm doing a Diploma in Network Systems and one of my modules is Java Programming. All my lessons are on ColCampus so I can't physically interact with my educators which is really a challenge, they don't make content as easily understandable as you do, I find myself very frustrated at times not understanding what to do, however I find your content really helpful. Thank you so much.
Thanks for believing in us 🙏
You are the greatest teacher ❤️
I'm sure you've heard it before but you're a really good teacher!
yur a genius! yu solved my all problems that I have in java program.
yu made my life easier xxxx....
I’ve watched like 20 videos and this is the only one that answered all my questions ur Amazing!!
thank you so much! this is my first year in computer science and my professor doesn't upload any lecture notes to our school's website. I was hopeless about studying before I found your channel.
First time I completely understood a tutorial on the first watch. Thank you!
your a life saver, my teacher doesn't teach at all so this really helped
You're an amazing teacher!!!!!
This is one of the best tutorials I have seen! Thank you!
Thank you for this video. I'm currently taking Java Programming for my online class and it's online only. I work full time and am a college student full time so I have little time to study and fully take it in. I haven't fully read Scanner and was a little confused from it (if I had more time I would fully understand) but being able to watch your video and get a better explanation helped me understand it better. Thank you
Thank you Alex, just because of you I'm going to start Java on my own
I dont know who you are but you may have saved my semester
You have excellent teaching skills. Glad I found your channel. While others simply explain what to use and what the result is, you explain why to use it, and thus makes perfect sense in one's head. Thank you!!
IT WAS EXPLAINED SO WELL, OHMYGOD. THANK YOU THANK YOU THANK YOU! I guess I won't flunk computer science this year after all.
Thanks Alex. Your explanation is top notch. Before now I wanted to skip that scanner sh*t but I could now play around with it. Thank you. AC from Nigeria
Great tutorial, Alex! You've earned yourself another happy camper!!
this is the lesson that i am looking for, teaching every codes uses. my professor teaching as to code but not teaching as how the code works.
You are still helping lives
One of the best tutorials I've ever seen thanks Alex you're amazing
Not even the book explains it this simple. Thank you so much
thanks bro, you saved up my finals, I can now enjoy my christmas break :).
For the next 24 hours, you are my favorite human of all time.
Man, you really deserve to have over million subscribers. I like your teachings && I hope in the future I'll become like you!
Thanks for the teachings! :)
Thankyou sir. I liked the way to teach very detailed and its good that you do recap to make sure every line is clear. Thanks from a student of firstyear college from philippines
This was so amazing! I have an exam today and you helped me understand Scanner in detail with a wonderful program. TYSM!!
this is the best tutorial for scanner in java. cool, good job now i know how scanner work in java
I love the way you teach sir. Thank you!
*0.06* Scanners aren't taught very well !!! I felt that and i used to think that i was the only one facing issues with scanner input :(
We all do bud.
Me too I am vonfused
What is Resource leak "sc" please make this topic video please
I am in that stage rn😭😭
you explained way better than my instructor ..
Thankyou for this Tutorial Alex Lee! This saved me understanding our lesson!!!❤️
These videos are so clutch, thank you so much! I hope you continue to make these, they are super valuable.
Hey, Alex, You made my schooling easy, Thank You :>
I wanna be a programmer in the future, i just started doing programming, and this really helped, thanks
I had six epiphanies in the first four minutes of this video, thank you for teaching me in 12 minutes what my prof couldn't teach me in two weeks of classes!
glad i found this channel, just what i needed! im experiencing hardships in my first year in IT :
Bro, thank you so much for this tutorial, I love your vids.
Thanks Alex, love your simplicity. ♥️
Thanks man I am building a big java project through out the semester and your videos are helping
You teach better than my lecturer thank you
love your tutorial its very clear and easy to understand
THANK YOU YOU MADE THIS SO MUCH EASIER FOR ME!!!
Thank you very much! Alex
Very good and thorough explanation bro
Dude youre the realest, thank you for the explanation.
Man!! You are Great🔥🔥you make everything so easy
It helped me a lot especially in this pandemic condition
Couldnt leave without a comment,
Amazing 🙌
Bro first video i watch and certainly won't be the last thankyou for this tutorial
very well explained! 👍
You solve a problem I’ve been dealing with for a month in 2 mins. Thank you.
thanks sir this helped me very well in my studies
feel like he would hold me while i cry because i am going to flunk out of school
same!!!!!
girl you got this!!
You are better than my teacher ❤️😁
Ohmygod! You are the best! Thank you, Alex!
Thank you Alex. You are a great teacher!
Yo Alex, your video helped me solve my problems and your way of teaching is simple. Thanks bud!
Thank you brother. The content is very very clear and helpful
Alex, I love you man!!! You just saved my mind from being exploded...!
thanks Alex your videos are so helpful. i dont know how else to show my gratitude, Thank you. i am at better position now. i hope i pass...
I’m just a 10 year old kid trying to learn java and now I know a lot!
Thanks brother for me you work like parttime mentor whom i can visit whenever i want and you are always available
Alex you are Awesome man!! thank you so much for your videos. i am studying java on a well known site and it is good but i always check youtube videos and you are very consistent on making java Understandable! thanks so much for what you do for us inspiring to get into programming.
Thank you for sharing your own talent
this was awesome major thanks
You got my like and subscribe sir, you just gave me an idea for my Midterm projects. plus you explain it very well! Thanks again sir.
broo thanks a lot , it saved me man , lots of love
Alex you are the best man :)
Thank you Alex this video really help to write my first program as beginner
package contitionalstatmentsloop;
import java.util.Scanner;
public class Scannerexp {
public static void main(String[] args) {
Scanner scan=new Scanner (System.in);
System.out.println("inter your first name");
String name=scan.next();
System.out.println("inter your subject");
String subject=scan.next();
System.out.println("inter your exam score");
int examscore= scan.nextInt();
if (examscore >= 90 ) {
System.out.println("your Pass and your grade A");
}
else if (examscore>=80) {
System.out.println("your pass and your grade is B");
}
else {
System.out.println("your field ");
}
System.out.println("Thank you "+" "+name+" "+"yours are subject is = "+ ""+subject+ " "+"your result"+" "+examscore);
}
}
In Eclipse, use Ctrl-Space when you have typed Scan, and you will get expansion and also imported Scanner in one go.
I usually have System.out.print() and not println() to print prompt for telling the user what to enter.
Scanner should also be closed before the program exits, which could be done with try-resource.
try (Scanner in = new Scanner(System.in)) {
String name = in.next():
int age = in.nextInt();
}
And you should probably use printf() instead of println()/print() when printing out values. As you have way better control of formating the output.
I love how you solve the problem with mixing next() and nextLine(); I will take that with me.
Thank you for explaining these things. Your videos helped me a lot!
God bless you.
Thanks a lot for this tutorial! Java Software Solutions by Lewis and Loftus was really confusing when explaining scanners (Chapter 2.6). You made it so much easier to understand!
I love this videos
I liked this video a lot. If even I understood, then you did amazing
Thanks, man. This is great.
bro just casually makes my life easier and saves my gpa!
Great video, Alex!!! Thank you for posting it :)
Hey thanks man, this was really helpful!
He made that so simple great job