Examveda

What will be the output of the following Java program?
import java.util.*;
class Arraylist 
{
    public static void main(String args[])
    {
        ArrayList obj1 = new ArrayList();
        ArrayList obj2 = new ArrayList();
        obj1.add("A");
        obj1.add("B");
        obj2.add("A");
        obj2.add(1, "B");
        System.out.println(obj1.equals(obj2));
    }
}

A. 0

B. 1

C. true

D. false

Answer: Option C


This Question Belongs to Java Program >> Collections Framework In Java

Join The Discussion

Related Questions on Collections Framework in java