package com.heima; import java.util.Scanner; public class Test_S { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner s = new Scanner(System.in); System.out.println("请输入一句话"); String line = s.nextLine(); System.out.println(line); } } 没问题啊 |