Kod:
public class SleepDeneme extends Thread {
  int uykusay=0;
     
    public void run(){
        try{
         while(true){
             System.out.println("uyuyor");
             sleep(60*10);  
            uykusay++;
            if(uykusay==6){
            System.out.println("uyandı");
            break;
            }
            }
       
             
          }catch(InterruptedException iEx){
               
          }     
        }
     public static void main(String args[])throws Exception {
        SleepDeneme sd=new SleepDeneme(); 
         sd.start();
     }
     
}