Santanu Guha wrote:Hi ,
DTO must implements serializable?
Ankush Kaundal wrote:See the range is the range of the subset which you have set, since 629 is outside the range of subset (608 to 611, where 608 is inclusive and 611 is exclusive) thats why you are getting the exception.
Santanu Guha wrote:
Matthew Brown wrote:Have you read the documentation for java.util.TreeSet#subSet(E, E)? It explains exactly why you get that exception.
In java doc the below is written :-
The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.
Equivalent to subSet(fromElement, true, toElement, false).
*** This is not clear --> "outside its range"
what should be the range ?