IntelliJ Organize Imports

后端 未结 14 995
孤街浪徒
孤街浪徒 2020-12-02 04:48

Does IntelliJ have an Organize Imports feature similar to that in Eclipse? What I have is a Java file with multiple classes missing their imports. Example:

p         


        
14条回答
  •  醉梦人生
    2020-12-02 05:29

    Simple & short solution worked for me.

    Go to File -> Settings -> Editor -> Auto Import -> Java (left panel) and make the below things: Select check box for "Add unambigious imports on the fly" and "Optimize imports on the fly"

    Refer this.

提交回复
热议问题