Which java version do you use?
If I look at the scanner documentation, there are several constructors, but no default constructor. You need to pass some arguments for the call “new java.util.Scanner(xxxx)”
See https://docs.oracle.com/javase/8/docs/api/java/util/Scanner.html
solved Importing classes Java [closed]