Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner; //imports from the API so you can just type Scanner
- public class EchoLine {
- public static void main(String[] args) {
- Scanner myScanner = new Scanner(System.in); //TODO learn what this means
- System.out.println(myScanner.nextInt());
- //grabs the first number from the next line of input
- //input can only be numbers
- //myScanner.nextLine() would output the entire line
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement