修改 Project Structure > Project Setting > Modules > {your module} > Language level
Project Structure > Project Setting > Modules > {your module} > Language level
修改后就没有错误提示了
作者: 小鸣Cycling 出处: https://www.cnblogs.com/52liming/p/13689048.html