This is a classic "short circuit".
For the && case:
if ((line != null) && (!line.equals("")) {
If line does equal null, then there is no reason for the compiler to process the second part of the if statement. The whole if statement MUST be false. So it short circuits the second part of the if statement, and you don't get the null reference exception.
When you switch the && to ||, then the compiler does have to process the second part of the if statement, because if either part is true then the whole thing is true. Therefore, you can get the null reference exception.
Note: If you can also use StringUtils of the Apache commons-lang to both checks in one:
if (StringUtils.isNotBlank(str))
Update: For the || case, if the first part were true, then the whole if statement must be true, so again there is no reason to process the second part of the if statement.