Question: What will be printed with the following code? Integer a = new integer ( 1 ) ; Integer b = new integer ( 3 )

What will be printed with the following code? Integer a = new integer(1); Integer b = new integer(3); Integer c = new integer(2); TreeSet ts = new TreeSet(); ts.add(a); ts.add(b); ts.add(c); System.out.println(ts); Will print [3,2,1] Will print [1,3,2] Will print [1,2,3] Will print [3,1,2]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!