Created
          August 1, 2013 19:25 
        
      - 
      
- 
        Save dhust/6134417 to your computer and use it in GitHub Desktop. 
    IO - Simple example
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Ask the person a question they need to respond to | |
| System.out.print("What is your name: "); | |
| // Create a Scanner object to allow input from the user | |
| Scanner inputString = new Scanner(System.in); | |
| // Use the Scanner object to save the user's response, and put it into a String variable | |
| String name = inputString.next(); | |
| // Print using their response | |
| System.out.print("Hello " + name); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment