Scanner sc = new Scanner(System.in);
时间: 2024-05-19 13:13:39 浏览: 111
Java基础之Scanner键盘录入.docx
5星 · 资源好评率100%
This line of code creates a new Scanner object named "sc" that is used to read input from the user via the console (System.in). The Scanner class is part of the Java.util package and provides various methods to read different types of data from the user.
阅读全文