Home / MCQ Bank / Computer
Computer Collections Framework In Java Difficulty: Medium

What will be the output of the following Java code snippet? public class Test { public static void main(String[] args) { Set s = new HashSet(); s.add(new Long(10)); s.add(new Integer(10)); for(Object object : s) { System.out.println("test - "+object); } } }

Select the correct option to test your answer:

More Computer Questions

Which of the following values specifies a 3D grooved outline? What kind of list will <ol> tags create ? To which of the following access specifiers are applicable? Where are standard exception classes grouped? Which of the following adds all new files to local repository?