IDEA如何自动/手动导入包

来源:互联网 发布:化妆品网络在线客服 编辑:程序博客网 时间:2024/06/14 20:08

在编写代码时,IDEA可以自动导入需要的包,可以提高开发的效率。MacOS X环境下设置如下:

ItelliJ Idea->preference→Editor→General→Auto Import

选中Optimize imports on the fly和Add unambiguous imports on the fly; 点击apply 和OK键。

Optimize imports on the fly:自动去掉一些没有用到的包
Add unambiguous imports on the fly:自动帮我们优化导入的包

原创粉丝点击