Learn Java Tutorial 1.5- Using Scanner to get User Input

///Learn Java Tutorial 1.5- Using Scanner to get User Input

Learn Java Tutorial 1.5- Using Scanner to get User Input

FavoriteLoadingAdd to favorites

In this Java tutorial for beginners we will learn how to get user input. We will use a scanner object to get the information that the user types with their keyboard.

Java468x60

Learn more information and get the source code for this tutorial in our blog post: .

Visit Our Friends @ Stone River E-Learning for Additional Tutorials –

Coupon 20% Off HTML & CSS for Beginners –

source

By |2019-10-10T23:07:15+00:00October 10th, 2019|Java Video Tutorials|44 Comments

44 Comments

  1. Eddie Páez October 10, 2019 at 11:07 pm - Reply

    Now I finally get it!!! Thanx a bunch.

  2. Di Marie October 10, 2019 at 11:07 pm - Reply

    I wish you had newer tutorials. Yours are the easiest to understand and fastest to learn.

  3. ZvXGamer October 10, 2019 at 11:07 pm - Reply

    at 3:03 why is it barking 7 times if the while loop says it needs to be less than finish?

  4. Mark Anthony Matias Valdez October 10, 2019 at 11:07 pm - Reply

    How to make a scanner like what "ZIPGRADE" is using?

  5. The Silence of Time October 10, 2019 at 11:07 pm - Reply

    this is awesome you explain it very well, auto subscribe haha thanks a lot for the information

  6. Mono Me October 10, 2019 at 11:07 pm - Reply

    Fav programming channel of all times, keep the hard work please!!

  7. Kerim Grozny October 10, 2019 at 11:07 pm - Reply

    After using the Scanner object a couple of times it stops accepting values anymore, so i have to create a new object of Scanner, why it that has anyone encountered the same issue?

  8. Rohit Dhawan October 10, 2019 at 11:07 pm - Reply

    hey i am in a middle of exam and i need someone to help me up making this program!!! ASAP !
    Write a Java program which allow user to input two people’s name and age and then display who is older and their age difference. PLEASE WRITE THE ANSWER BY REPLYING HERE THANKS !

  9. Patrick Sato October 10, 2019 at 11:07 pm - Reply

    What IDE do you use sir?

  10. Navin Poppy October 10, 2019 at 11:07 pm - Reply

    sorry i just want to know the platform you use to code that ? is it eclipse?

    thanks

  11. DemonKingpin October 10, 2019 at 11:07 pm - Reply

    Thx.i understood all of it.actually i had an exam on java so i…hope i did well in it

  12. Chathurinda711 October 10, 2019 at 11:07 pm - Reply

    ok ,is this bucky ?

  13. ThigsVlogz October 10, 2019 at 11:07 pm - Reply

    I dont like this!!!

  14. Leonardo Galindo October 10, 2019 at 11:07 pm - Reply

    It cant find the .nextLine();
    Helppp

  15. omar siedahmed October 10, 2019 at 11:07 pm - Reply

    Great video thank you for the useful information.

  16. Angel Sanchez October 10, 2019 at 11:07 pm - Reply

    So far the best video I have seen to explain user input. I am pretty good at c# but brand new to Java. Thanks.

  17. Kasper October 10, 2019 at 11:07 pm - Reply

    My project wont open ;((((

  18. Mohamed Ryan October 10, 2019 at 11:07 pm - Reply

    when i wrote import java.util.Scanner
    i got error say " incorrect package "
    i use NetBeans IDE 6.9.1
    whats wrong ??

  19. WildRock56 October 10, 2019 at 11:07 pm - Reply

    Nice 😀 

  20. Mauricio Landos October 10, 2019 at 11:07 pm - Reply

    why do you have to state nextInt(), when it has already been stated before that the variable finish is an integer?

  21. Bad Luck Brian October 10, 2019 at 11:07 pm - Reply

    How did you know there was a thing called Scanner? What do i do if i don't know something like this in the future?

  22. BRETT SULLIVAN October 10, 2019 at 11:07 pm - Reply

    WELCOME THE WORLDWIDE OHOGS!!!!!!!!

  23. ColninjaPlays October 10, 2019 at 11:07 pm - Reply

    on the 1.8 version there isn't a classes.jar

    what do I click.

  24. killmeplease October 10, 2019 at 11:07 pm - Reply

    I DONT HAVEZ THE CLASSES.JAR!

  25. Matthew BPBuds October 10, 2019 at 11:07 pm - Reply

    I don't have classes.jar! HEEEEEEEEEEEEELLLLLLLLLLLP!!!!!!!!!!!!!!!!!!!!!!!

  26. zena ahmed October 10, 2019 at 11:07 pm - Reply

    hi I stil hv an error under the inputFromUser 🙁

  27. ButtonMasher October 10, 2019 at 11:07 pm - Reply

    Thank god this exists holy crap. 

  28. ShyGuyProductions October 10, 2019 at 11:07 pm - Reply

    I am now going to create the best thing made from Java, Thanks you you! XD

  29. Stuxnet agent-exe October 10, 2019 at 11:07 pm - Reply

    um i got an extra woof and no spaces what did i do wrong ???

  30. madferret October 10, 2019 at 11:07 pm - Reply

    no classes.jar for me 🙁

  31. Not Legato October 10, 2019 at 11:07 pm - Reply

    anyone using nextLine() and nextInt() in the same program, remember that after you read nextInt(), a stray n is left lingering, meaning the next time you use nextLine(), the first character will be that (a line break), so always remember to clear the scanner before using it or you'll likely get an error.

    i was wondering about that myself for a while when my input just wouldn't quite work.

  32. BaSs HaXoR October 10, 2019 at 11:07 pm - Reply

    dude, java looks ALOT like C#. 

  33. ArtofDreaming1 October 10, 2019 at 11:07 pm - Reply

    you are giving me a sense of clarity I haven't had before. so after I make the effort to apply whats you have taught and if it works i can tell you straight off it will have changed my life in a most profound way. wish me luck and thanks even for the hope i have right now

  34. HEALING 808 October 10, 2019 at 11:07 pm - Reply

    Hey trav… are you sure your name is travis and not seth green? XD thanks for teaching bro.

  35. Di Ko October 10, 2019 at 11:07 pm - Reply

    I made a small programm which takes the user input(number) and starts a method(depending on input). The problem is, how do i get to the start of the programm, or restart it?
    F.e.: If the input is something that is not defined, the programm tells the User, that he has to input something else, but after that, you'd have to restart the programm manually. Now I want to go back to the beginning, by restarting the programm automatically(so that the hello message + etc. comes, instead of ending the programm)
    How do I do that?

  36. Claymore2408 October 10, 2019 at 11:07 pm - Reply

    Holy shit this guy sounds like Bucky… but isn't this the guy who also did the Android tutorials for thenewboston?

  37. Милош Баскић October 10, 2019 at 11:07 pm - Reply

    The classes.jar is now called rt,jar 😉

  38. I love my bed October 10, 2019 at 11:07 pm - Reply

    When I hovered over scanner no options came up so if this has happened to you then you need to type it manually.

  39. td October 10, 2019 at 11:07 pm - Reply

    Thank you for these easy-to-follow and informative tutorials. I’m now through this one, eagerly going on to the next.

  40. MC_Mac_MC October 10, 2019 at 11:07 pm - Reply

    Guhhh… @saychao22 I'm sorry, it would've been the good folder but the file Scanner.jar probably went to com.sun.java_cup.internal.runtime, that's where I found it.

  41. MC_Mac_MC October 10, 2019 at 11:07 pm - Reply

    Oh @saychao22 I found it, go into rt.jar, then scroll down to find com.sun.java.util.jar.pack and that should be it, Scanner.jar didn't show up for me though but I hope it does for you.

  42. MC_Mac_MC October 10, 2019 at 11:07 pm - Reply

    @saychao22 I don't have a classes.jar either… @mybringback What do I need to do?

  43. Yochio October 10, 2019 at 11:07 pm - Reply

    I simply love your tutorials! Thanks 🙂

  44. tito colon October 10, 2019 at 11:07 pm - Reply

    @ M.Kachmarik: what is your error message?

Leave A Comment

*