?
What will be the output of the following Java code snippet?
What will be the output of the following Java code snippet?
public class Demo
{
public static void main(String[] args)
{
Map sampleMap = new TreeMap();
sampleMap.put(1, null);
sampleMap.put(5, null);
sampleMap.put(3, null);
sampleMap.put(2, null);
sampleMap.put(4, null);
System.out.println(sampleMap);
}
}
public class Demo
{
public static void main(String[] args)
{
Map sampleMap = new TreeMap();
sampleMap.put(1, null);
sampleMap.put(5, null);
sampleMap.put(3, null);
sampleMap.put(2, null);
sampleMap.put(4, null);
System.out.println(sampleMap);
}
}
Join the Discussion
Login to post a comment or share your explanation.
Login