

MCQOPTIONS
Saved Bookmarks
1. |
What is the output of this program?
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)); obj.clear(); System.out.print(obj.size()); } } |
A. | 0 |
B. | 1 |
C. | 2 |
D. | 3 |
Answer» B. 1 | |