import java.util.ArrayList;
import java.util.List;
public class List1 {
public static void main(String[] args) {
List list=new ArrayList();
list.add("aaa");
list.add("bbb");
list.add("ccc");
list.add("ddd");
list.add("fff");
System.out.println(list.get(3));
System.out.println(list.get(4));
System.out.println(list.get(1));
}
}
Output
ddd
fff
bbb
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.