import java.util.List;
import java.util.ArrayList;
public class OpList {
public static void main(String args[]) {
int i;
List<String> testList;
testList = new ArrayList<String>();
testList.add("the first element");
testList.add("the second element");
testList.add("the third element");
testList.add("the fourth element");
// change the sequence
testList.remove("the third element");
testList.add(1, "the third element");
for(i = 0; i < testList.size(); i++)
System.out.println(testList.get(i));
}
}
the result: