title: Why does my PriorityBlockingQueue in Java not sort properly?
body: <p>For some reason when I add to the priority queue, it doesn't sort my strings entirely alphabetically and I can't see why.</p>
  
  <p>This is the code which adds to the PriorityBlockingQueue:</p>
  
  <pre><code>String toAdd = String.format("%s/%s", directory, s);
  outputData.add(toAdd);
  </code></pre>
  
  <p>But I get not entirely sorted output (only first few lines but you can see it's not sorted):</p>
  
  <pre><code>../StartingTree/files/abknl/apfmpohgyh/a.class
  ../StartingTree/files/abknl/apfmpohgyh/a.java
  ../StartingTree/files/abknl/aqybc/aeph.java
  ../StartingTree/files/abknl/apfmpohgyh/bnjuxxdi.class
  ../StartingTree/files/abknl/bbxudleuf/jlffhq/y/xwjj/dyetqhsch/bpg.class
  ../StartingTree/files/abknl/bbxudleuf/mxb/fe/ndmg/axapxuco.html
  ../StartingTree/files/abknl/aqybc/atyuojdu.txt
  </code></pre>
  
  <p>And this is the real (first part) of sorted output from the expected-output file:</p>
  
  <pre><code>../StartingTree/files/abknl/apfmpohgyh/a.class
  ../StartingTree/files/abknl/apfmpohgyh/a.java
  ../StartingTree/files/abknl/apfmpohgyh/bnjuxxdi.class
  ../StartingTree/files/abknl/apfmpohgyh/bnjuxxdi.java
  ../StartingTree/files/abknl/apfmpohgyh/bsqsq.class
  ../StartingTree/files/abknl/apfmpohgyh/bsqsq.java
  ../StartingTree/files/abknl/apfmpohgyh/ds.class
  ../StartingTree/files/abknl/apfmpohgyh/ds.java
  </code></pre>