title: Exit a while loop Java
body: <p>I can not get this loop to stop even though I set the count variable = to false. And it won't go to the next method called in the Main class. Any help would be greatly appreciated.</p>
  
  <p>Main Class</p>
  
  <pre><code>public class Main {
  
  
      public static void main(String[] args) {
  
          Var V = new Var();
          End E = new End();
  
          V.enter();
          E.end();
  
      }
  
  }
  </code></pre>
  
  <p>Var Class</p>
  
  <pre><code>public class Var {
  
      static int x = 0;
      static boolean count = true;
  
  
      public static void enter(){
  
          while (count = true ){
              x = x+10;
              System.out.println(x);
              count = false;
          }
      }
  
  }
  </code></pre>