Receiving Input from the User

This video tutorial explains how to receive input from the user in java programming using and Scanner class.

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.

Source code for this video tutorial

package LearningJava;

import java.util.Scanner;

public class Anil {

 public static void main(String[] args) {

  Scanner input = new Scanner(;
  int age;
  System.out.println("Enter your age");
  age = input.nextInt();
  System.out.println("Ok your age is " + age);
  System.out.println("Enter your avarage");
  double average = input.nextDouble();
  System.out.println("Ok your average is " + average);