stdin in Java is routed to the input stream System.in
The easiest way I know to read from stdin is use a Scanner object.

public static void main(String[] args)
{
Scanner reader = new...