use the Swing JOptionPane.showInputDialog component method.
/ BufferedReader resides in the java.io package
import java.io.*;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter A Value: "

; // this is a cout
System.out.flush(); // flushing the out buffer
String theValue = in.readLine(); // mocking cin
If you want to read in a int from commandline, look at the following codes :
try
{
int temp = (new Integer((String)in.readLine())).intValue();
}
catch (NumberFormatException e)
{
System.out.println("Input is not a number."

;
}
For JOptionPane, it could be used in both UI applications and applets. So which you are
going to use will depend on whether you are coding a UI or not.
Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.