问题描述
代码里面出现了太多的if条件怎么优化
相关代码
if (workPerson.contains("A")){
a ++;
}
if (workPerson.contains("B")){
b ++;
}
if (workPerson.contains("C")){
c ++;
}
if (workPerson.contains("D")){
d ++;
}
if (workPerson.contains("E")){
e ++;
}
if (workPerson.contains("F")){
f ++;
}