I have a float array and a String array. each float value match with a specific String. I would like to sort the float array keeping the own string using :
ResultVoiceObject[] objects = ... Arrays.sort(objects, new Comparator() { @Override public int compare(ResultVoiceObject arg0, ResultVoiceObject arg1) { return Float.compare(arg0.getRanking(), arg1.getRanking()); } });