Scanner Demo03
作者:互联网
package Scanner;
import java.util.Scanner;
public class Demo03 {
public static void main(String[] args) {
//从键盘就收数据
Scanner scanner = new Scanner(System.in);
System.out.println("请输入数据:");
String str =scanner.nextLine();
System.out.println("输出的内容为:"+str);
scanner.close();
}
}
标签:String,System,Scanner,Demo03,scanner,public,out 来源: https://www.cnblogs.com/JiZiHe/p/16175100.html