Examveda

What will be the output of the following Java code?
import java.util.*;
class hashtable 
{
    public static void main(String args[]) 
    {
        Hashtable obj = new Hashtable();
        obj.put("A", new Integer(3));
        obj.put("B", new Integer(2));
        obj.put("C", new Integer(8));
        System.out.print(obj.contains(new Integer(5)));
    }
}

A. 0

B. 1

C. true

D. false

Answer: Option D


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

Join The Discussion

Related Questions on Collections Framework in java