Yes, this is a valid example of using short-circuiting correctly:
if(customerIndex < 0 || customerIndex >= 5 || customers[customerIndex] == null)
This code works only under the assumption that ||
stops evaluating as soon as it gets a true
- otherwise, customers[customerIndex]
could be reached with an invalid index, triggering an exception.