Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. public class GenericObjectArray<E> {
  2.  
  3. private Object[] array;
  4.  
  5. public GenericObjectArray(int s) {
  6. array = new Object[s];
  7. }
  8.  
  9. E get(int i) {
  10. @SuppressWarnings("unchecked")
  11. final E e = (E) array[i];
  12. return e;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement