What will be the output of this code snippet?
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
System.out.println(str);
Compilation error
Prints nothing
Reads and prints one line of input
Throws IOException always
This question is part of this quiz :
Java BufferedReader vs Scanner and Fast I/O