Good day. I need advice on how to find all the values in the TreeMap with an "incomplete" key. Suppose there are some values with the keys "Book", "Boom", "Trap" ... With the key "Boo" should output the values at which the key begins on this piece.
Tried to use the methods ceilingKey(), floorKey(), higherKey(), lowerKey() , but ran into a problem, displays only one value. I tried to delete items after receiving it, then it displays the entire TreeMap until it is empty.
Maybe there is some more suitable approach for this task?