Here are the steps to read a line of input from System.in:
1. Wrap System.in in an InputStreamReader
2. Wrap the InputStreamReader in a BufferedReader
3. Use the BufferedReader's readLine() method to read a full line of input as a String
So something like:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
This will read the input as a String rather than individual bytes.