Comparing user defined objects : Comparable and Comparator

Comparison plays important role in any programming language. Almost all the sorting techniques involves comparison. In Java, all the predefined classes and primitive data types supports comparison. User defined data types needs to provide the comparison logic, Comparable and Comparator comes in picture. For the primitive data type, how to compare is inbuilt and can […]
 •  0 comments  •  flag
Share on Twitter
Published on January 06, 2017 00:18
No comments have been added yet.