wiley_pastebin

Lesson 1 wrapper 1

Mar 15th, 2019
2,854
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. import java.util.ArrayList;
  2.  
  3. public class ArrayListTest {
  4.  public static void main(String[] args){
  5.   ArrayList<Integer> list = new ArrayList<>();
  6.  
  7.   Integer x = new Integer(1);
  8.   Integer y = 2;
  9.  
  10.   list.add(x);
  11.   list.add(y);
  12.   list.add(x+y+5);
  13.  
  14.   System.out.println(list.get(2));
  15.  }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment