Home » Java » java – I can't import Scanner from util-Exceptionshub

java – I can't import Scanner from util-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

Im quite new to Java and want to import the class “Scanner” from util class.

When I type import java.util.Scanner; my Eclipse IDE underlines this line red.

When I try to import the whole package:
import java.util.*;,no any problem. But still I can’t use Scanner in my code.

Once I had the same problem with importing JOptionPane from swing and was able to fix that by importing JavaSE-1.8 either.
Normally I use JavaSE-1.12.
Doing this again for importing Scanner it doesn’t help.
What can I do?

How to&Answers: