Intellij IDEA generate for-each/for keyboard shortcut

前端 未结 7 849
我寻月下人不归
我寻月下人不归 2020-12-07 07:58

Is there a keyboard shortcut generating a foreach and also for loop?

7条回答
  •  隐瞒了意图╮
    2020-12-07 08:16

    You can use Postfix Completion too. Press Ctrl + Alt + S to open the Settings. For example:

    int[] list = {1, 2, 3};    
    list.for -> for(int i : list) {}
    

提交回复
热议问题