Hi Folks,
I have a question with regards to Sorted Map's subMap method. Do have a look at the following code, my question follows:
The output for the above is:
{a=ant, d=dog, h=horse} {d=dog}
If I were to change the line, in which I have made the comment 'Highlight' to
The output from the second print statement is than
{}
I don't understand than why? I was actually still expecting to get the same output as before.
I am saying this based on my understanding that the subMap method works as follows:
Content: a d h
KeyValue: a, b, c, d, e, f, g, h, i, j, k, l, m, n
Since I had ("b" and "d") I thought I should still get {d=dog}. I hope someone can point out to me where I am going wrong. Thanks.
regards
John