Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Java 中,如果我通过一个名为 Driver 的文件与多个类进行交互,我是否只需要在该 Driver 文件或所有文件中导入扫描仪?
正如 Hovercraft 所说,将 java.util.Scanner 导入到您希望将其称为“扫描仪”的所有文件中。