public static void main(String[] args) {
ArrayList<String> list = new ArrayList<>();
list.add("a");
list.add("b");
swap(list,0,1);
}
public static ArrayList<String> swap(ArrayList<String> list,int a,int b){
String temp = list.get(a);
list.get(a) =
return null;
}
关键地方写不下去了,不知道数据类型如何处理,求大神分析解答
|
|