Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ArrayList<String> arreglo=new ArrayList();
- ArrayList<Integer> arreglo=new ArrayList();
- public class Box<T> {
- private T t;
- public void set(T t) { this.t = t; }
- public T get() { return t; }
- }
- Box<String> boxString = new Box();
- boxString.set("abc");
- Box<Integer> boxInteger = new Box();
- boxInteger.set(100);
- ArrayList<Object> arreglo=new ArrayList<>();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement