```
public class Solution {
public boolean canAttendMeetings(Interval[] intervals) {
if(intervals.length <= 1) return true;
Arrays.sort(intervals, new Comparator<Interval>(){
public int compare(Interval o1, Interval o2){
//ascending order
return o1.start - o2.start;
}
});
//Return false if next meetings start time is less than previous meetings end time
for(int i=0; i < intervals.length-1; i++){
if(intervals[i].end > intervals[i+1].start) return false;
}
return true;
}
}
```