What will the output be when this code is run? TreeSet ts=new TreeSet<>(); ts.add(65); ts.add(65); ts.add(-65);

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

What will the output be when this code is run? TreeSet ts=new TreeSet<>(); ts.add(65); ts.add(65); ts.add(-65);

Post by answerhappygod »

What Will The Output Be When This Code Is Run Treeset Integer Ts New Treeset Ts Add 65 Ts Add 65 Ts Add 65 1
What Will The Output Be When This Code Is Run Treeset Integer Ts New Treeset Ts Add 65 Ts Add 65 Ts Add 65 1 (21.83 KiB) Viewed 32 times
What will the output be when this code is run? TreeSet<Integer> ts=new TreeSet<>(); ts.add(65); ts.add(65); ts.add(-65); System.out.println( ts.size()); A [-65, 65] B) [65, 65, -65] 3 D E 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply