Java read input from console

To capture input from console in Java program you have several options. Two of the most commons ones are to use Scanner (java.util.Scanner) or BufferedReader ( Both of them are using (standard input stream) to capture the keyboard input. ⚠ One thing to consider is that both classes Scanner and BufferedReader implement Closeable ( … Read more