What is the output of the following Java program?
import java.util.*;
public class Main {
public static void main(String[] args) {
ArrayList<Integer> l = new ArrayList<>(Arrays.asList(5, 6, 7, 8));
l.remove(1);
l.remove(Integer.valueOf(8));
System.out.println(l);
}
}- A[5, 7]
- B[5, 6, 7]
- C[6, 7]
- D[5, 7, 8]
Correct answer: A