title: Whats my mistake (bubblesort) ? the first 3 numbers are the same and the last 4 numbers aswell?
body: <p>The first 3 numbers that I get are always 0, and the last 4 numbers are mostly the same. I have no idea where my mistake is...</p>
  
  <pre><code>public static boolean sortieren(int[] value) {
  
      boolean check = false;
      int oldvalue = 0;
  
      for (int i = 0; i &lt; value.length - 1; i++) {
          if (value[i] &gt; value[i + 1]) { // vergleicht welche Stelle größer
                                          // ist
              oldvalue = value[i];
              value[i] = value[i + 1];
              value[i + 1] = oldvalue;
              check = true;
          }
      }
      return check;
  }
  
  public static void main(String[] args) {
  
      final int laenge = 8; // Array definiert
      int[] arr = new int[8];
      Random randomgenerator = new Random(); // Random definiert
      for (int i = 0; i &lt; laenge; i++) {
          arr[i] = randomgenerator.nextInt(100);
  
          while (sortieren(arr) == true) {
              System.out.println(arr[i]);
          }
      }
  }
  </code></pre>