Hay there, I need to create a list for a project with amount of terms for this method but it kind of didn't work as I thought. The "term"-names also have to look like this and have been sorted in the form of "Term:1", "Term:2",..., "Term:amount". If amount should be negative I have to return an empty list. I tried the following:
public static List <String> createTerms(int amount){
List <String> termNames = new ArrayList<String>();
if (amount>0){
termNames.add(amount,"Term:"+amount);
Collections.sort(termNames);
return termNames;
}else
return Collections.emptyList();
}