I don't know, is there a problem? I just see three screenshots.
I'm guessing that you don't get the result printed out (but my crystal ball is broken so I don't know for sure). That could have a couple of reasons. Some of the most likely:
- The list is not sorted. Collections.binarySearch only works on sorted lists.
- The ID is a Double or Float (which again is a big guess). Computers can't handle floating point numbers well (we have an FAQ about it, can someone find it?). That means that the comparison of one
2.11 might not give an equal comparison with another
2.11. Use BigDecimal or
String instead.