Guest User

Untitled

a guest
Feb 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. for(int i = 0; i < n; i += 1)
  2.  
  3. for(int i = 0; i < n; i++)
  4.  
  5. //Java
  6. public class ArrayIterator implements Iterator<T> {
  7. private final T[] array;
  8. private int index = 0;
  9. public ArrayIterator(T ... array) {
  10. this.array = array;
  11. }
  12.  
  13. public T next {
  14. if (! hasNext()) throw new NoSuchElementException();
  15. return array[index++];
  16. }
  17. ...
  18. }
  19.  
  20. int k;
  21. int *kpointer = &k;
  22. *kpointer++ = 7;
Add Comment
Please, Sign In to add comment