import java.util.*;
public class SwapEleOfArraylist{
public static void main(String args[]){
ArrayList<String> colors = new ArrayList<String>();
colors.add("Violet");
colors.add("Indigo");
colors.add("Green");
colors.add("Yellow");
colors.add("Orange");
colors.add("Red");
Collections.swap(colors,0,4);
System.out.println("The Swapped Array is :"+colors);
}
}