Why the following method always return false for the below value. Do I confuse with somethings??
public boolean isTwoWay(Detail detail) {
return (detail.isExchange && detail.isTwoWay && !detail.isIVR);
}
which data contain following
detail.isExchange = true;
detail.isTwoWay = true;
detail.isIVR = false;
but it return false instead of true
Detail.isExchange = true;implies they are static (unless it's a typo).Detail.isExchangeis apparently being set as a static variable in theDetailclass. And then you are callingdetail.isExchange()as a method? Perhaps show a bit more code here.isExchange(), etc here too.