I have an if-else structure in Java as follow:
if (A || B || C){
if (A){
//Do something
}
if (B){
//Do something
}
if (C){
//Do something
}
} else {
//Do something
}
I want to know if there is any cleaner and easier way to replace this?
Aucun commentaire:
Enregistrer un commentaire