take input using bufferedreader in java code example
Example 1: taking string input in java
Scanner in = new Scanner(System.in);
String s = in.nextLine();
Example 2: how to input in java
import java.util.Scanner;
...
Scanner console = new Scanner(System.in);
int num = console.nextInt();
console.nextLine() // to take in the enter after the nextInt()
String str = console.nextLine();