Archived

This topic is now archived and is closed to further replies.

fizbanx

cin >> (in java)?

Recommended Posts

boohillie    210
I think this is what you are looking for, I hope it helps.


  
import java.io.*;

public class inputTest
{
public static void main(String args[])
{
BufferedReader console =
new BufferedReader(new InputStreamReader(System.in));

try
{
// This is you would read a string from the console

String str = console.readLine();
}

catch(IOException e){}
}
}





Share this post


Link to post
Share on other sites