In a very sketchy way:
public class Book implements Comparable<Book> {
private String title;
private String publisher;
// ... constructor(s), getter/setter methods, toString(),...
Type: Posts; User: andbin
In a very sketchy way:
public class Book implements Comparable<Book> {
private String title;
private String publisher;
// ... constructor(s), getter/setter methods, toString(),...
Comparable must be implemented into the class of the objects to sort, so you can have only 1 ordering with Comparable for a given type, that should be the "natural" ordering of the objects (the order...