java控制台输入带空格的字符串 Scanner sc = new Scanner(System.in); String str = sc.nextLine(); 转载于:https://www.cnblogs.com/new0801/p/6146632.html