I have a java program:
我有一个java程序:
public class ProcessMain {
public static final void main(String[] args) throws Exception {
Scanner keyboard = new Scanner(System.in);
boolean exit = false;
do
{ if(keyboard.hasNext()){
String input = keyboard.next();
System.out.println(input);
if( "abort".equals(input)){
ABORT();
exit = true;
}
}else{
System.out.println("Nothing");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}while (!exit);
}
private static void ABORT(){
System.out.println("ABORT!!!!");
}
}
public c