All pastes #505664 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-23 17:55 UTC
rendered paste body
StringBuilder sb = new StringBuilder();
for (int x : a) {
   boolean writeEmpty = false;
   for (int y = 0; y < ret.length; i++) {
      if (x == a[ret[y]]) {
         sb.append(':').append(x).append(':');
         writeEmpty = true;
      }
   }
   if (writeEmpty) {
      sb.append(' ').append(x).append(' ');
      writeEmpty = false;
   }
}
System.out.println(sb.toString());