The binarySearch method of the class Collections assumes that the list passed as argument to it, in this case 'list', is already sorted. If the list passed to the method is not sorted then this may result in undefined behaviour. For proper usage of the binarySearch function one should always sort the list before calling it.
Use the above code fragment in your program before you call the binarySearch method. Hopefully this clears your doubt.