I thought you only used implements for interfaces. By doing so you include all the signatures of the methods to the interface, as well as any primitave values. However I was looking at the interface Comparable. It seems it can implement all the classes that represent primitive objects ? Kind of confusing to me, can anyone help shed some light ? Thanks,
However I was looking at the interface Comparable. It seems it can implement all the classes that represent primitive objects? An interface doesn't implement a class, it's the other way around. Regarding the Comparable, if you want to be able to compare the instances of a class based on some criteria, you simply implement the Comparable interface by providing the implementation of the compareTo(Object o) method in that class. Eugene. [ April 21, 2003: Message edited by: Eugene Kononov ]
posted 14 years ago
Thanks again Eugene
N.D:"Anything worth having, takes time to get"
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad: