Hi!
Reading Collections API I have found that this expression..
SortedSet sub = s.subSet(low, high+"\0");
..returns subset inclusive all elements from low to high.
I don't understand how does it happen.
How addition of "\0" may change pointer of subset?
Could someone explain me?
Tnank you!
Here is explanation found in API(but I don't understand it):
"...
If you need a closed range (which includes both endpoints), and the element type allows for calculation of the successor a given value, merely request the subrange from lowEndpoint to successor(highEndpoint). For example, suppose that s is a sorted set of strings. The following idiom obtains a view containing all of the strings in s from low to high, inclusive:
SortedSet sub = s.subSet(low, high+"\0");
..."