Eclipse : transform static method invocation to a static import

后端 未结 1 1928
鱼传尺愫
鱼传尺愫 2021-01-31 14:55

Is there a way to transform automatically this static method invocation (Arrays.asList):

import java.util.Arrays;
import java.util.List;

public cla         


        
相关标签:
1条回答
  • 2021-01-31 15:28

    Put the cursor on the method name (asList) and press Ctrl-Shift-M.

    This is the default keyboard shortcut for the 'Add Import' command. You can also find the command on the 'Source' menu.

    0 讨论(0)
提交回复
热议问题