📄 robot.java
字号:
import java.io.*;
public class robot{
public static void main(String[] args){
String s;
int i = 0;
String[] ss = {"How are you!","Glad to meet you!","Yes,it is!","No problem!",
"Very well!","Fine,thank you!","Bye!"};
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
System.out.println("Please input:");
try{
s = in.readLine();
while(! s.equals("exit")){
System.out.println("answer:"+ss[i++]);
if(i==7)i=0;
s = in.readLine();
}
System.out.println("End of inputing.");
in.close();
}catch(IOException e){
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -