I need to have nested if condition but i see my code has the same logic for the else portion as well.
Syntax
if(outer_condition){
if(inner_condition){
}
else{
employee.setCompany("ABC");
employee.setAddress("DEF");
}
}
else{
employee.setCompany("ABC");
employee.setAddress("DEF");
}
Both Else portion has to execute the same logic, is there a way to avoid this and make single Else condition ?
Thanks
ifcondition by joining both conditions with an&&operator.