Problem with underscore(_) in Collections.binarySearch (Java)
- by Alex Cheng
Hi all.
Problem:
I am using Java Tutorials™ sourcecode for this. This is the source code.
I tried this:
--following with another section of sorted words--
words.add("count");
words.add("cvs");
words.add("dce");
words.add("depth");
--following with another section of sorted words--
and it works perfectly. However when I use this:
--just a section of sorted words--
words.add("count");
words.add("cvs");
words.add("dce_iface");
words.add("dce_opnum");
words.add("dce_stub_data");
words.add("depth");
--following with another section of sorted words--
It does show dce_iface when I type dce, but when I type _ then following with o or s it shows me something else like dce_offset where the offset comes from words.add("fragoffset"); somewhere in the list.
What can I do to solve this problem? Thank you in advance.