用键盘输入字符串并打印出来 Demo1源代码:编译运行: Demo1 源代码: import java.util.Scanner; public class Demo1 { public static void main(String []args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); System.out.println(str); } } 编译运行: 编辑于2022年3月7日