Guest User

Untitled

a guest
Jan 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Arraylist1{"this", "is", "a", "coding", "test"};
  2. Arraylist2{"this", "is", "random1", "a", "random2", "coding", "random3", "test"};
  3.  
  4. "this" "is" "a" "coding" "test"
  5.  
  6. list1.contains(list2.get(i)))
  7.  
  8. Iterator<String> List1_Iterator = List1.iterator();
  9.  
  10.  
  11. while (List1_Iterator.hasNext()) {
  12. }
  13.  
  14. List<Integer> list1 = Arrays.asList(1,3,5);
  15. List<Integer> list2 = Arrays.asList(1,2,3,4,5);
  16. ArrayList<Integer> list2Copy = new ArrayList<>(list2);
  17. list2Copy.removeIf(x -> !list1.contains(x));
  18. System.out.println(list1.equals(list2Copy));
Add Comment
Please, Sign In to add comment