Multiple Choice Question

Quiz Guidelines

 

QID: 
238
Tags: 
Question: 

Given:

import java.util.*;
public class TestClass {
    public static void main(String[] args) throws Exception {
        ArrayList<Double> al = new ArrayList<>();
        //INSERT CODE HERE
     }
}

What can be inserted in the above code so that it can compile without any error?

Select 3 options

A. al.add (111);
B. System.out.println (al.indexOf (1.0));
C. System.out.println (al.contains ("string")); 
D. Double d = al.get (al.length);
E. al.notifyAll();

Q&A Set: