📜  java sort arraylist of floats - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:47.757000             🧑  作者: Mango

代码示例1
Collections.sort(Arrays, new Comparator()
{
    @Override
    public int compare(Object o1, Object o2)
    {
        return Float.compare(o1.getFloatValue(), o2.getFloatValue());
    }
});