Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GenericObjectArray<E> {
- private Object[] array;
- public GenericObjectArray(int s) {
- array = new Object[s];
- }
- E get(int i) {
- @SuppressWarnings("unchecked")
- final E e = (E) array[i];
- return e;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement