MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program? import java.util.*; class Maps { public static void main(String args[]) { HashMap obj = new HashMap(); obj.put("A", new Integer(1)); obj.put("B", new Integer(2)); obj.put("C", new Integer(3)); System.out.println(obj.get("B")); } } |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | null |
| Answer» C. 3 | |