-
What is the output of this program?
import java.util.*;
public class hashtable_Example
{
public static void main(String args[])
{
Hashtable object = new Hashtable();
object.put("I", new Integer(10));
object.put("L", new Integer(60));
object.put("U", new Integer(25));
System.out.print(object.contains(new Integer(25)));
}
}
-
- True
- U
- L
- False
- None of these
Correct Option: A
Hashtable object object contains values 10, 60, 25 when object.contains(new Integer(25)) is executed it searches for 25 in the hashtable since it is not present true is returned.