Android Array List Element Swap swapArrayElements(ArrayList list, int first, int second)

Here you can find the source of swapArrayElements(ArrayList list, int first, int second)

Description

swap Array Elements

License

Open Source License

Declaration

public static void swapArrayElements(ArrayList list, int first,
            int second) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

public class Main {
    public static void swapArrayElements(ArrayList list, int first,
            int second) {
        Object temp = list.set(first, list.get(second));
        list.set(second, temp);/* www .j a v  a2 s .co m*/
    }
}