Treemap uses red-black tree internally for implementation. Treemap takes Comparable<> or Comparator<> as parameter which red-black tree uses for inserting data in binary search tree.
From java 8, hash map has started using red-black tree once threeshold of linklist is reached in case of hash collision. My question is, for custom class I implement equals() and hashcode() but not comparator and use this custom class as key in hashmap then how red black tree will work without comparator in case of hash collision.