The code is from http://algs4.cs.princeton.edu/11model/BinarySearch.java.html for Algorithms textbook.
import java.
Classes StdIn, StdOut and In aren't part of the standard Java libraries. They're support classes provided to go along with the Princeton course.
From the 1.1 Programming Model page linked in the source code:
Standard input and standard output. StdIn.java and StdOut.java are libraries for reading in numbers and text from standard input and printing out numbers and text to standard output. Our versions have a simpler interface than the corresponding Java ones (and provide a few tecnical improvements).
...
In.java and Out.java are object-oriented versions that support multiple input and output streams, including reading from a file or URL and writing to a file.
So if you want to use the binary search code as-is, you'll need to download those files.