Part #1: Write a method called equallists in a class called compare. The method accepts three ArrayList objects list1, l
Posted: Thu Jul 14, 2022 2:13 pm
Part #1: Write a method called equallists in a class called compare. The method accepts three ArrayList objects list1, list2 and list3 of type ArrayList as parameters. The list3 is to be generated by compare the list 1 and list 2 by the method, if both lists list1 items and list2 items are equal then write 1 in the same index in list3, else write 0. public class compare 1 public static ⟨E> boolean equalists (ArrayList ⟨E⟩ list1, ArrayList ⟨E⟩ list2, ArrayList ⟨E⟩ list3) \{ 1 Part #2: Write a class called Test_equallists having main method to test the application. In main method create following: 1- Object of type ArrayList list1. 2- Add the following data to list1 ( (4 413181901). 3- Object of type ArrayList list2. 5- Object of type ArrayList list3. 6- Test the equallists method to print the result.