You answered your own question by reading the documentation.
What if the item is not in the tree, or has already been removed, will this method raise an exception?
And then the documentation:
Returns true if this set contained the element
So it will return false if the set does not contain the element (“not in the tree” and “has already been removed” are in fact the same case)
solved Method remove() of TreeSet type return