Java read line of input from console

https://w‮tual.ww‬turi.com
Java read line of input from console
/**
 * @author lautturi.com 
 * Java example: get input from console in java
 */

import java.util.*;

public class Lautturi {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		 
        String s = in.nextLine();
        System.out.println("You entered string " + s);
 
        int a = in.nextInt();
        System.out.println("You entered integer " + a);
 
        float b = in.nextFloat();
        System.out.println("You entered float " + b);
	}
}
Created Time:2017-09-28 14:12:53  Author:lautturi