📜  如何在 Java 代码示例中扫描字符串

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

代码示例4
import java.util.*;
public class ScannerExample 
{
  public static void main(String args[])
{
    Scanner in = new Scanner(System.in);
    String name = in.nextLine();
    System.out.println(name);  
}
}