how to use functions to take input in java bufferedreader code example
Example: how to read integer input using bufferedreader java
BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
int num = Integer.parseInt(reader.readLine());