Java Long Compare and ValueOf method undefined

后端 未结 2 758
我寻月下人不归
我寻月下人不归 2021-01-26 20:01

I am referencing my java version JDK 1.8 but I am still getting error. What is wrong with this referencing (writing Java after 6 years)? or any other simpler way to do this? I d

2条回答
  •  抹茶落季
    2021-01-26 20:25

    Alternatively anytime you need Comparator or any other class that implements Comparable you can call:

    Comparator.naturalOrder()
    

    https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#naturalOrder--

提交回复
热议问题