Thanks to you and Joshua Bloch the author for reminding us to be pedantic when it comes to making values fit into ints.
Writing a binary search was one of the first things taught when learning COBOL and IBM 370 Assembler back in the day. I’m pretty sure I implemented it at least once in each language. What I really wrote numerous times for implementation was bubble sort. There were no handy framework DLLs to call back then.