100% cpu because of this thread java
<p>i have just attempted to add something to my game where if one player is hit by a bullet his health goes down. problem is when i am checking for this, CPU is at 100% and everything sooo laggy. This is a problem. here is the thread i am using:</p>

<pre><code> package Graphics;

 import java.util.logging.Level;
 import java.util.logging.Logger;


 public class BulletCollision implements Runnable {
     Player1 player1 = new Player1();
     Player2 player2 = new Player2();

     public Thread checkBulletCollision = new Thread(this);

     public void checkPlayerBulletCollide() {
         if (player2.getBulletX() &gt; player1.getX() &amp;&amp; 
             player2.getBulletX() &lt; player1.getX() - 50) {
            player2.decHealth(50);
         }
     }

     @Override
     public void run() {
         while(true) {
             checkPlayerBulletCollide();
             try {
                 checkBulletCollision.sleep(100);
             } catch (InterruptedException ex) {
                 Logger.getLogger(BulletCollision.class.getName()).log(
                     Level.SEVERE, null, ex);
             }
         }
     }
  }
</code></pre>

<p>i am pretty sure this is where the problem is. there are no errors when compiled or ran. if anyone could help that would be amazing! and i just make this class so the code is not perfect. i have tried a lot to fix this, the Threads start() method is being called in my Display class which only displays the JFrame. i previously had the start method in one of my player classed.   </p>
