This is the class of my object (I need timestamp is a string):
public class Evento{
public String timestamp;
public Evento(String timestamp) {
super();
this.timestamp = timestamp;
}
public String getTimestamp() {
return timestamp;
}
}
In my activity I have:
Evento evento = new Evento[10];
for(int i = 0; i<10; i++)
evento[i] = new Evento(/*Casual String timestamp*/);
Then I have populated the array, how can I sort it by the timestamp inserted?