what is the difference between import Java. util.* and import java.util.scanner
Answers
Answered by
9
If we write import Java. util.* this will include and execute scanner class as well as the rest of the class but if we use import java.util.scanner this will include and execute only the scanner class, so it is better to write import Java. util.* in any of java program.
please mark as brainliest
Answered by
28
Explanation:
util package is imported which includes the Scanner class and many others. If a program imports java. ... Scanner, then just the Scanner class in the java. util package is imported.
Similar questions