My programing World
A collection of programs and interview questions
Sunday, January 25, 2015
Java : how to accept input from user
import java.util.Scanner;
public class hack {
public static void main(String[] args) {
int a;
Scanner in = new Scanner(System.in);
a = in.nextInt();
System.out.println("Value : " + a);
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment