I have an ArrayList called Test with the fields:
public class Teste
{
private String dctitle;
private String rdfabout;
private String dbid;
private String depto;
private String sigla;
private String ciclo;
private String state;
private String dataplanejadainicial;
private String dataEntradaEstado;
private String id;
private String executante;
}
This ArrayList has N items and I need to create a method "OrderDept" which will receive as a parameter the ArrayList<Teste> teste
and return me an ArrayList with the Tests ordered by Departments. Home
I know I have a method called .sort but I do not know how to use it.
NOTE: in the Test class all the Get and Set attributes are implemented, I just did not put it so as not to leave the question too big