Skip to content

Instantly share code, notes, and snippets.

@IanMcT
Created January 20, 2019 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanMcT/cb72dd1cc9d42c7c74b04d8ec27d0a33 to your computer and use it in GitHub Desktop.
Save IanMcT/cb72dd1cc9d42c7c74b04d8ec27d0a33 to your computer and use it in GitHub Desktop.
javaSampleInput created by IanMcT - https://repl.it/@IanMcT/javaSampleInput
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter a number");
int n = scanner.nextInt(); // read an integer from input stream.
System. out. println(n); // print n.
System.out.println("Hello world!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment