package com.zxs.process;标签:Scanner,process,输入输出,System,String,测试,out,scanner From: https://www.cnblogs.com/xiaoxiaodeyan/p/17113718.html
import java.util.Scanner;
public class process {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("使用next接收数:");
if(scanner.hasNext()){
String str = scanner.next();
System.out.println("输入的内容为:"+str);
}
scanner.close();
}
}