Philipp_M: Eine Sekunde warten

Beitrag lesen

Probier mal so was:

  
public class waittest  
{  
 public static void main(String[] args)  
 {  
  System.out.println("Warte jetzt...");  
  
  try  
   {  
    Thread.sleep(5000);  
   }  
  catch(InterruptedException e)  
   {  
    System.out.println("Sleep Interrupted");  
   }  
  
  System.out.println("Fertig mit warten");  
 }  
}