Friday, October 31, 2014

Read data from user using Java

This is reading input from the user using Scanner in Java.
hey now
hey now
view raw output hosted with ❤ by GitHub
import java.util.Scanner;
public class ReadInput {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println(sc.nextLine());
}
}
view raw ReadInput.java hosted with ❤ by GitHub

No comments:

Post a Comment