What is the first current object in compareTo() method in JAVA comparable interface?

大城市里の小女人 提交于 2019-12-12 02:20:00

问题


What is the working style of compareTo(Object o) method. How the first object of a set is compared? Every time when an object is created the constructor is called and the values are assigned with this for class variables and the same class variables are compared with Object o, but, what is o in this case?

来源:https://stackoverflow.com/questions/39752908/what-is-the-first-current-object-in-compareto-method-in-java-comparable-interf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!