read method in Bufferedreader in java documentation code example
Example: bufferedreader java
import java.io.BufferedReader;
//
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.println(reader.readLine());
import java.io.BufferedReader;
//
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.println(reader.readLine());