public void wait(int seconds){ //设置等待时间 try { Thread.sleep(seconds * 1000); } catch (InterruptedException e) { e.printStackTrace(); }可以直接被调用,eg:wait(2);