ExamVeda
Login
Home
Collections Framework in java
?

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);
		}
	}
}

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.