idea automatically imports packages and automatically deletes packages

When we copy the code, we need to import packages one by one. When we delete the code, the unused packages are useless. If we forget to delete them, the code will be bloated. Setting up automatic import and automatic deletion of packages makes our code more concise.

1、file–>settings

insert image description here

2. Find Auto Import

insert image description here

3、勾选Add unambiguous imports on the fly 和 Optimize imports on the fly

insert image description here

4. Effective in personal testing

Finish! ! !
hy:26


										美的本质存在于思想中而非物质世界。---柏拉图《理想国》

Guess you like

Origin blog.csdn.net/weixin_49107940/article/details/132310921