基本上我想让它问你你叫什么名字,所以喜欢
System.out.println("Stranger: what is your name?");
then here like System.out.println("Name:");kb scanner //so i dont have to skip a line
以及我将如何做到这一点,以便在第一个对话框之后您必须按空格或键才能获得下一个 system.out.println
import java.io.*;
import java.util.Scanner;
public class tester {
public static void main(String[] args) {
System.out.println("Stranger: Good morning");
System.out.println("Stranger: you had a terrible Dream..");
System.out.println("Stranger: what is your name?");
System.out.println("Name:");
Scanner kbReader = new Scanner (System.in);
String s = kbReader.next();
System.out.println("Nice to meet you " + s);
System.out.println("my name is Master Wizard.");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("");
}
}
多谢你们!对不起,我对这些东西很陌生,哈哈,即使这是基本的,我的蓝色鹈鹕书没有提到这些东西