9 lines
243 B
Java
9 lines
243 B
Java
|
//: generics/ListOfGenerics.java
|
||
|
import java.util.*;
|
||
|
|
||
|
public class ListOfGenerics<T> {
|
||
|
private List<T> array = new ArrayList<T>();
|
||
|
public void add(T item) { array.add(item); }
|
||
|
public T get(int index) { return array.get(index); }
|
||
|
} ///:~
|