Advertisement
kady

Untitled

Apr 24th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. Something x = new Something();
  2. Something y = doSomething(x);
  3. Something r = x ;
  4. Something z = r ;
  5. Something t = doSomething(z); //Got it ;)
  6.  
  7. ArrayList<Bohahahaha> arr = new ArrayList<Bohahahaha>();
  8. arr.add(new Bohahahaha());
  9. arr.remove(0);
  10. arr.add(new Bohahahaha());
  11. arr.add(new Bohahahaha());
  12. arr.add(new Bohahahaha());
  13. arr.add(new Bohahahaha());
  14. arr.add(new Bohahahaha());
  15. arr.add(new Bohahahaha());
  16. arr.add(new Bohahahaha());
  17.  
  18. ArrayList<Bohahahaha> arrTemp = arr;
  19.  
  20. while(!arr.isEmpty())
  21. {
  22.     arr.remove(0);
  23.     arrTemp.remove(0); //WHY :|
  24. }
  25.  
  26. Something x1 = new Something();
  27. Something y1 = doSomething(x1);
  28. Something r1 = x1 ;
  29. Something z1 = r1 ;
  30. Something t1 = doSomething(z1); //Got it This Time ;)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement