📜  java 读取字符串输入 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.113000             🧑  作者: Mango

代码示例1
import java.util.Scanner;
 
public class YourClass {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String inputString = scanner.nextLine();
        System.out.println("Your string: " + inputString);
    }
}