title: how to set a infinite loop and break it. (Java threads)
body: <p>i have set a thread and i want to run it using a loop. so this thread should run in the loop and break in a certain time and again run the loop. </p>
  
  <p>please i have no clue how to do this. can someone guide me. </p>