文章目录 一、问题描述二、解决方法1.File→Settings2.Editor→Inspections→General→Duplicated Code fragment→把勾选去掉即可 一、问题描述 可以看到下面图片代码中的灰色波浪线,特别影响观感,是因为有了重复代码。 二、解决方法 1.File→Settings 2.Editor→Inspections→General→Duplicated Code fragment→把勾选去掉即可