You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// sets = no want duplicate and no order we use sets only unique
// 1st - hashset->implpnet linked hashset
// 2ns ->sorted set->navigable set-> tree set
SortedSet<Integer> ss = new TreeSet<>();
ss.add(12);
ss.add(21);
ss.add(2);
System.out.println(ss); // we are getting soirted input then by jvm using camparable (interface ) in ascending order and if we ewnat our sorting then we use caparator