BufferedReader java import code example
Example 1: declare bufferedreader java
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Example 2: java bufferedreader
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
private static StringTokenizer st;
static String next() throws IOException {
while (st==null||!st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine().trim());
}
return st.nextToken();
}
static long readLong() throws IOException {
return Long.parseLong(next());
}
static int readInt() throws IOException {
return Integer.parseInt(next());
}
static double readDouble() throws IOException {
return Double.parseDouble(next());
}
static String readLine() throws IOException {
return br.readLine().trim();
}