如何解决项目中出现大量if{}else if{}的问题

如何解决项目中出现大量if{}else if{}的问题

在这里插入图片描述
解决方法
(1)使用includes进行优化
在这里插入图片描述

(2)使用switch(){case}进行优化

猜你喜欢

转载自blog.csdn.net/TotoroChinchilla/article/details/131063809