Community driven content discussing all aspects of software development from DevOps to design patterns. The easiest way to garner user input in a Java program is to use the System’s Console class.
That's saying that the java.util.Scanner constructor is marked as being able to throw the exception java.io.FileNotFoundException - you either need to wrap that in a try/catch or mark your function as ...