Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
how do i make 2 comparable methods in only one class using -'java,sorting,collections,comparable'
how do i make 2 comparable methods in only one class ¬†using -'java,sorting,collections,comparable'
I've got one class, that I sort it already by one attribute.
Now I need to make another thing, that I need to create another way to sort my data.
How can I make it, so I can choose between the two methods.
The only command I know is Collections.sort that will pick up the method compareTo from the class I want to compare its data.
Is it even possible?
Sep 7, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening