Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class testList {
- public List<Integer> whatIsThisFunction(List<Integer> src, List<Integer> dst){
- while (!src.isEmpty()) {
- dst.add(dst.size(), src.remove(0));
- }
- return dst;
- }
- public static void main(String args[]){
- List<Integer> src = new ArrayList<Integer>();
- src.add(1);
- src.add(2);
- src.add(3);
- src.add(4);
- List<Integer> dst = new ArrayList<Integer>();
- dst.add(9);
- dst.add(7);
- dst.add(22);
- whatIsThisFunction witf = new whatIsThisFunction(src,dst);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement