title: I get an error in the while loop
body: <p>I have some code that doesn't work, I placed an arrow at the error.</p>
  
  <p>I'm suppose to make a  ~loop while (j > 0) AND (array at j-1 > Min)`.</p>
  
  <p>What am I doing wrong? Why do I keep getting errors? </p>
  
  <p>Please help! And thank you for reading! It might just be a simple stupid mistake. It tells me one is a int, other is boolean, what do I do?</p>
  
  <pre><code>private static int[] dorp(int[] myArray){
      int n = myArray.length;
      int swap;
       for(int i = n-1; i &gt;= 0; i--){
          int j = i;
          int min = myArray[i];
        --&gt;  while ((j = 0) &amp;&amp; (myArray[j-1] &gt; min)) {
          myArray[j]=myArray[j-1];
          j=j-1;
              }
          j=min;
          }
      return myArray;
  }
  </code></pre>
  
  <p>New code </p>
  
  <pre><code>    int myArray[] = {1, 6, -1, 7, 83, 19, -3, 6, 2, 4, 6, 32, 66, -9};
      int n = myArray.length;
      myArray = doop(myArray);
      for (int i = 0; i &lt; n; i++) {
          System.out.println(myArray[i]);
      }
  }
  
  private static int[] doop(int[] myArray) {
      int n = myArray.length;
      int swap;
      for (int i = n - 1; i &gt;= 0; i--) {
          int j = i;
          int min = myArray[i];
          while ((j == 0) &amp;&amp; (myArray[j - 1] &lt;= min)) {
              myArray[j] = myArray[j - 1];
              j = j - 1;
          }
          myArray[j] = min;
      }
      return myArray;
  }
  </code></pre>