Will it create any problem if we add elements with key as user defined object into the treemap?
Answer / Makeshwar Tanti
No, it won't cause any problems. A TreeMap in Java can store keys of any type that implements the Comparable interface or provides a custom Comparator. This allows you to add user-defined objects as keys.
| Is This Answer Correct ? | 0 Yes | 0 No |
What can be stored in an arraylist?
What is linked list with example?
Which sorting algorithm is used in collections sort?
Why concurrenthashmap is fail safe?
What are the advantages of sorting and filtering data?
What are different types of sorting algorithms?
Explain the term recursive case?
What do you mean by disjoint set adt?
Explain implementation of deletion from a binary tree.
Two linked lists are given, find out the sum of them without altering the linked list?
What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?
What is the difference between static and dynamic data?