Generics in Java Tutorials | Java9s Tutorials

In this beginners video tutorial you will learn how to receive input from the user in java programming using and Scanner class with example.

You are gonna learn how to create an object of Scanner class, how to associate with it, how to read integer, floating point, character and boolean value from the user and store it in variable in detail with examples.

Get the source code of this tutorial at our website

Watch Video tutorials in HINDI at

Catch us on SocialMedia
Video Rating: / 5

12 Comments+ Add Comment

  • anyhow i learnt the topic by this video itself.

  • Hi Really appreciate your way of teching Sir….got to learn a lot from your videos…….I am trying to find a way to take a char input from the keyboard……can you help me out please??

  • Sir I am unable to input string after taking an integer using Scanner method.
    What can I do?

    Scanner input = new Scanner(;
    int age;
    System.out.println("Enter Your age:");
    age = input.nextInt();
    String name;
    System.out.println("Enter your name");
    name = input.nextLine();

  • Sir then what is the advantage of scanner input not linking with the console over linkage of out with the console?? i mean why not the input is linked with the console? wt's the advantage of that?

  • 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


  • Hi sir anil. I would to ask.. How to input strings, when I input two words like, "TWO WORDS", it only prints out the word "TWO" only but the word "WORDS" doesn't appear. I mean when I input two words, only one word appears when I System.out. Please help. Sir anil. thanks in advance, always following on LearningLad

  • Hii sir ur classes are simple super and little bit confusing also, but i can understand this stuff basically i am Windows Admin.
    By watching ur videos i can understand.

  • what is the need of input.close();

  • Got confused. I thought you are going to show on how to use a scanner input device to read input instead of a keyboard in Java.

  • Did not hear a scanner beep sound… ( }: – [ )

  • Did not hear a scanner beep sound… ( }: – [ )

  • Now I finally found a good and understandable tutorial. Thank you very much sir. And I hope you wouldn't stop teaching and sharing about your amazing skills/knowledge in programming.