Advertisement
Guest User

Untitled

a guest
Dec 27th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import java.util.Scanner; //imports from the API so you can just type Scanner
  2.  
  3. public class EchoLine {
  4.  
  5. public static void main(String[] args) {
  6. Scanner myScanner = new Scanner(System.in); //TODO learn what this means
  7.  
  8. System.out.println(myScanner.nextInt());
  9. //grabs the first number from the next line of input
  10. //input can only be numbers
  11. //myScanner.nextLine() would output the entire line
  12. }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement