Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- public class ArrayListTest {
- public static void main(String[] args){
- ArrayList<Integer> list = new ArrayList<>();
- Integer x = new Integer(1);
- Integer y = 2;
- list.add(x);
- list.add(y);
- list.add(x+y+5);
- System.out.println(list.get(2));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment