File >> Project Structure >> Project 中设置Project language level如下:
File >> Project Structure >> Modules,然后选择需设置的module,如下图所示: