java get input from stdin code example
Example: java stdin
public static void main(String[] args) {
StdOut.print("Type an int: ");
int a = StdIn.readInt();
StdOut.println("Your int was: " + a);
StdOut.println();
}
}