Many people asked question like that but this one is a little bit different. Here is the code:
public static BufferedReader reader; public static String read
Closing the BufferedReader closes System.in. You shouldn't close it at all, and you shouldn't keep creating a new one either: you will lose data. Use the same one for the life of the process.
BufferedReader
System.in