Would it be possible to add default methods to Comparable without breaking Java?

前端 未结 0 554
轻奢々
轻奢々 2021-01-24 09:33

I was thinking of proposing a feature request to add default methods called:

default boolean greaterThan(T o) {
    return compareTo(o) > 0;
}

default boolean         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题