почему такая конструкция не работает private boolean compressTiles (Tile[] tiles){ Tile [] tileOld = new Tile [0]; System.arraycopy(tiles, 0, tileOld, 0, tiles.length); Arrays.sort (tiles, (o1, o2) -> { if (!o1.isEmpty() && o2.isEmpty()) {return -1;} else return 0; }); if (Arrays.equals (tiles,tileOld)) {return false;} else return true; }