Java Programming Tutorial 10 – Scanner Input

///Java Programming Tutorial 10 – Scanner Input

Java Programming Tutorial 10 – Scanner Input

FavoriteLoadingAdd to favorites

Check out Pramp:

Java468x60

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

source

By |2021-01-14T11:45:49+00:00January 14th, 2021|Java Video Tutorials|36 Comments

36 Comments

  1. DA foundation January 14, 2021 at 11:45 am - Reply

    word to my mother this guy better than all my lecturers lmao

  2. Hawa Drammeh January 14, 2021 at 11:45 am - Reply

    Thank you

  3. Micah Mizell January 14, 2021 at 11:45 am - Reply

    didnt really help me at all… 🙁

  4. El hombre enmascarado January 14, 2021 at 11:45 am - Reply

    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?

  5. BassOutcast January 14, 2021 at 11:45 am - Reply

    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");

    }
    }
    }

  6. matwit91 January 14, 2021 at 11:45 am - Reply

    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.

  7. Kiren Shergill January 14, 2021 at 11:45 am - Reply

    i am using repl.it

  8. Kiren Shergill January 14, 2021 at 11:45 am - Reply

    what are you using to enter the code?

  9. A Duck January 14, 2021 at 11:45 am - Reply

    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();

  10. Modern Cheelo January 14, 2021 at 11:45 am - Reply

    And it took me this long to find you😀😀

  11. Rose Strobe January 14, 2021 at 11:45 am - Reply

    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.

  12. Joshua T. Coe January 14, 2021 at 11:45 am - Reply

    look at curry man, so inspirational

  13. Viviana Mullen January 14, 2021 at 11:45 am - Reply

    It's not repeating what I type. Help?

  14. facemonster 11 January 14, 2021 at 11:45 am - Reply

    Great video again man

  15. Megha s babu January 14, 2021 at 11:45 am - Reply

    Thanks a ton for this!!! <3

  16. Rene Jacques January 14, 2021 at 11:45 am - Reply

    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.

  17. Synverse ltd January 14, 2021 at 11:45 am - Reply

    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.

  18. samed sgrtmc January 14, 2021 at 11:45 am - Reply

    it is confusing to name the variable as scanner, not a good choice for new learners.

  19. Lalu January 14, 2021 at 11:45 am - Reply

    Hey, can someone explain the importance of scanner before a method?

  20. Kakoli Parial January 14, 2021 at 11:45 am - Reply

    The Scanner Input Tutorial 10 was not very clear.

  21. J3fro C January 14, 2021 at 11:45 am - Reply

    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???

  22. GrandmaAmari January 14, 2021 at 11:45 am - Reply

    Is there a scanner type for "char" or do I use byte in that case?

  23. Dawn Robertson January 14, 2021 at 11:45 am - Reply

    Fast pace on casting

  24. Anodos Arcade January 14, 2021 at 11:45 am - Reply

    Do you have "Taco Queen" as a hotkey?

    …..do i want to know why?

  25. Goblinkiller January 14, 2021 at 11:45 am - Reply

    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

  26. OccupyZero2One January 14, 2021 at 11:45 am - Reply

    Spot on with the explanation!!

  27. Dopey Doggo January 14, 2021 at 11:45 am - Reply

    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

  28. nephtaly Bahena martinez January 14, 2021 at 11:45 am - Reply

    I liked it, but you went too fast. Thanks for the video.

  29. CJMC January 14, 2021 at 11:45 am - Reply

    This has helped me a lot! I was able to make a program that guesses your age based off of your birth year input!

  30. Kristie P. January 14, 2021 at 11:45 am - Reply

    Thank you for the wonderful videos! They serve as a good alternative for when book learning gets a bit boring. 🙂

  31. Thanks. I have another question to ask you about a problem. Can I send you a screen shot?

  32. Agniva Sharma January 14, 2021 at 11:45 am - Reply

    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?

  33. Ziko Isaac January 14, 2021 at 11:45 am - Reply

    you are a good teacher. thnx

  34. Haseeb Malik January 14, 2021 at 11:45 am - Reply

    i get it now never mind

  35. Haseeb Malik January 14, 2021 at 11:45 am - Reply

    how is y assigned to 20?

Leave A Comment

*