Vidyalelo
Java Programming · Q160

Java Collections Framework

Programming · Java Programming · question 160

Q160

What will be the output of the following Java code? import java.util.*; class properties public static void main(String args[]) Properties obj = new Properties(); obj.put("AB", new Integer(3)); obj.put("BC", new Integer(2)); obj.put("CD", new Integer(8)); System.out.print(obj.keySet());

A.
{AB, BC, CD}
B.
[AB, BC, CD]
Answer
C.
[3, 2, 8]
D.
{3, 2, 8}

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board