aquaballoon

Java: Scanner (input)

Feb 25th, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Input {
  4.     public static void main(String args[]{
  5.         int x;
  6.         Scanner sc = new Scaner(System.in);
  7.         System.out.print("Input: ");
  8.         x = sc.nextInt();
  9.         System.out.println("Result: " + x);
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment