What Will Be The Output Of The Following Java Codep Pre #741
What will be the output of the following Java code?</p> <pre><code class="language-java" line="1"> 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()); } }</code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs128 Java.
It can also be found in
gs gs128 Java Util Collections Framework - Java.util - Dictionary, Hashtable & Properties - Quiz No.1.
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()); } }
{AB, BC, CD}
[AB, BC, CD]
[3, 2, 8]
{3, 2, 8}