Skip to main content

Java Topic Practice

ArrayList and Wrapper Classes

ArrayList and Wrapper Classes MCQ Practice

Question 1 of 15

Answered 0 of 15

Choose one answer.

What is printed by the following code segment?

import java.util.ArrayList;
public class Main {
  public static void main(String[] args) {
    ArrayList<Integer> nums = new ArrayList<Integer>();
    nums.add(3);
    nums.add(7);
    nums.add(3);
    nums.add(9);
    nums.remove(1);
    System.out.print(nums);
  }
}
Choose one answer.