📜  如何在 Java 代码示例中使用扫描仪

📅  最后修改于: 2022-03-11 14:52:36.660000             🧑  作者: Mango

代码示例2
import java.util.Scanner;

Public class Scanner {
    Public static void main(String[] args) {
        // Scanner *scanner name here* = new Scanner(System.in);
          Scanner scan = new Scanner(System.in);
          System.out.println("Type anything and the scanner will take that input and print it");
          String next = scan.next();
          System.out.println(next);
    } 
}