

Check out Pramp:
Java Crash Course:
Read the blog:
In the last video we talked about primitive data types. Today we are talking about scanner input!
Instagram:
Twitter:
Facebook:
More content:
Support me!
~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~
Subscribe to my newsletter:
Donate!:
Artist: ARTISS
Title: Tropical Summer
Instagram:
Twitter:
Facebook:
More content:
Support me!
~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~
Subscribe to my newsletter:
Donate!:
Artist: ARTISS
Title: Tropical Summer
Learn Javascript – http://bit.ly/JavaScriptPlaylist
Learn Java – http://bit.ly/JavaPlaylist
Learn C# – http://bit.ly/CSharpTutorialsPlaylist
Learn C++ – http://bit.ly/CPlusPlusPlaylist
Learn C – http://bit.ly/CTutorialsPlaylist
word to my mother this guy better than all my lecturers lmao
Thank you
didnt really help me at all… 🙁
Mister, if using encapsulation, when having a class with its private attributes, I only need to enter data using the set method.
How do I implement Scanner in the set method for classes with private attributes?
Built this little program using the lesson and the comments! I'm so excited!
import java.util.Scanner;
public class MySweetProgram {
public static void main(String[] args) {
System.out.println("What is your birthyear? Imma guess your age");
Scanner scanner = new Scanner(System.in);
int x = 2020;
int y = scanner.nextInt();
int a = x – y;
int a1 = a + 1;
int a2 = a – 1;
System.out.println(a);
System.out.println("Hell yeah, I knew you were " + a + " years old");
boolean age = scanner.nextBoolean();
if (age) {
System.out.println("That's what I'm talking about");
}
else {
System.out.println("Oh shit! So you're probably " + a1 + " years old!");
}
boolean age2 = scanner.nextBoolean();
if (age) {
System.out.println("Alriiiiiight");
}
else {
System.out.println("Oh damn…wait, so you're " + a2 + " years old!");
}
boolean age3 = scanner.nextBoolean();
if (age) {
System.out.println("Yeah, I mean, what other choices are there?");
}
else {
System.out.println("Dafaq? Man cut that bullshit, I'm done");
}
}
}
Thank you for your video, I have one question about an Eclipse. On 4th minute you are showing some windows with tips, on my version is all dark. How is called that? Maybe I will find it, or if you know how can I change it? Same issue with dark or light appearance – it's always black like blank page.
i am using repl.it
what are you using to enter the code?
meh… what about scanner.close() and going further?
So like
Scanner scanner = new Scanner(sysin);
…do something
scanner.close();
… later
scanner = new Scanner(sysin); <– same var name.
object.setName(scanner.next());
scanner.close();
And it took me this long to find you😀😀
my code won't even run. When I input string x = scan.nextLine(); or even string x = scan.next(); , the code after it won't even run.
look at curry man, so inspirational
It's not repeating what I type. Help?
Great video again man
Thanks a ton for this!!! <3
Every video and textbook has told me not to used float or double for money, but they never told me what to use. That was my biggest question. I've been around java now for 22 years now off and on, and this is the very first time I'm told what data type to use for currency. Thanks.
Thanks for sharing good information..! Our company Development company, planning to provide and we have helped synverse is one major service-based Software all our clients to increase business productivity, customer loyalty and find new customers online. You can view our website for the varied services we offer and our expert work. Take a look at some of the projects we have delivered. Log in to know more https://synverse.com updates on our platform.
it is confusing to name the variable as scanner, not a good choice for new learners.
Hey, can someone explain the importance of scanner before a method?
The Scanner Input Tutorial 10 was not very clear.
At 2:42 line 9: int y=scanner.nextInt(), what if I wrote in the console log "abc123"??? Does it find the next Int and store it in variable y???
Is there a scanner type for "char" or do I use byte in that case?
Fast pace on casting
Do you have "Taco Queen" as a hotkey?
…..do i want to know why?
i want a scanner that asks a question to the user. He then puts in a value then it gives the value.
exp: enter number of students applied to college
enter how many get accpeted;
then the value it gives is the the acceptance rate in percentage.
help please
Spot on with the explanation!!
At around 5:20 I don't get an input mismatch error if I just put in a random letter or number to the boolean scanner, it just evaluates as false
I liked it, but you went too fast. Thanks for the video.
This has helped me a lot! I was able to make a program that guesses your age based off of your birth year input!
Thank you for the wonderful videos! They serve as a good alternative for when book learning gets a bit boring. 🙂
Thanks. I have another question to ask you about a problem. Can I send you a screen shot?
At around 2:25, what happens if we do not use scanner. Nextline method. What does this NextLine actually do given we used scanner to take in a string from user?
you are a good teacher. thnx
i get it now never mind
how is y assigned to 20?