import java.util.*;
public class ExtractPortionOfArraylist{
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");
List<String> sub_String = colors.subList(0,2);
System.out.println("The Reversed Array is :"+sub_String);
}
}