Advertisement
Felanpro

get user input

Aug 14th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. import java.util.Scanner; //import scanner to be able to read data from user.
  2.  
  3. public class program1
  4. {
  5.    
  6.     public static void main(String[] args)
  7.     {
  8.         //Just some basic stuff in java.
  9.         Scanner get_input = new Scanner(System.in); //Whatever the user types in will be equal to get_input variable. it's an object act..?
  10.         System.out.println(get_input.nextLine());
  11.     }
  12.    
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement