the return type is List and I declare list for returning and how can I actually declare it after new?
public List<Record> findClosestRecords(int n) throws IndexException {
    if (!sorted || n > records.size()) {
    }
    List<Record> list = new ;
    for (int i = 0; i < n; i++) {
        Record r = this.records.get(i);
        list.add(i, r);
    }
    return list;
}
 
     
     
    