Equal lists

Report a typo

Here are four lists:

List<Integer> list1 = new ArrayList<>();
list1.add(1);
list1.add(2);
list1.add(3);

List<Integer> list2 = new LinkedList<>();
list2.add(3);
list2.add(2);
list2.add(1);

List<Integer> list3 = List.of(1, 2, 3);

List<Integer> list4 = List.of(1, 1, 2, 2, 3, 3);

In which cases the equals method returns true?

Select one or more options from the list
___

Create a free account to access the full topic