Question: Really need help (Java), thanks! Method intersect: accepts two sorted array lists of integers as parameters and returns a new list that contains only the
Really need help (Java), thanks!
Method intersect: accepts two sorted array lists of integers as parameters and returns a new list that contains only the elements that are found in both lists. For example, if lists named list1and list2 initially store: [1, 4, 8, 9, 11, 15, 17, 28, 41, 59] [4, 7, 11, 17, 19, 20, 23, 28, 37, 59, 81] Then the call of intersect(list1, list2) returns the list:[4, 11, 17, 28, 59] ]
Print the list that is returned by this method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
