Hi,

I was going through below link

http://codingbat.com/prob/p192082
I wrote solution as below

public boolean icyHot(int temp1, int temp2) {

if(temp1<0 && temp2>100)

{

return true;

}

if(temp1>0 && temp2<100)

{

return true;

}

return false;

}

I saw given solution as below

public boolean icyHot(int temp1, int temp2) {

if ((temp1 < 0 && temp2 > 100) || (temp1 > 100 && temp2 < 0)) {

return true;

} else {

return false;

}

// Could be written as: return ((temp1 < 0 && ...));

}

can the natural flow of next line can be written always after || (which is the only difference i see from my program.

Please advise