Advertisement
lamiastella

Untitled

Jun 20th, 2014
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1.  
  2. import java.util.*;
  3. public class testList {
  4.  
  5. public List<Integer> whatIsThisFunction(List<Integer> src, List<Integer> dst){
  6. while (!src.isEmpty()) {
  7. dst.add(dst.size(), src.remove(0));
  8. }
  9. return dst;
  10. }
  11.  
  12.  
  13.  
  14. public static void main(String args[]){
  15.  
  16.  
  17. List<Integer> src = new ArrayList<Integer>();
  18. src.add(1);
  19. src.add(2);
  20. src.add(3);
  21. src.add(4);
  22. List<Integer> dst = new ArrayList<Integer>();
  23. dst.add(9);
  24. dst.add(7);
  25. dst.add(22);
  26. whatIsThisFunction witf = new whatIsThisFunction(src,dst);
  27.  
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement