我有两个调用不同方法的变量:
public String[] longestSide(){
ArrayList<T> western = getWestern();
ArrayList<T> eastern = getEastern();
ArrayList<T> northern = getNorthern();
ArrayList<T> southern = getSouthern();
return //theLongestOne??
}
除了编写一堆if-else语句之外,找出哪个arraylists的长度最长并将其返回的快捷方式是什么?谢谢!