How to automatically convert if-else if statement to switch

前端 未结 7 2403
隐瞒了意图╮
隐瞒了意图╮ 2020-12-15 15:23

Is there a hot key or easy way to replace an if-else if statement with a switch in IntelliJ? I would prefer not to manually convert the if-else if statement to a switch. I

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 16:28

    When selected if/switch in Eclipse, press Ctrl+1 or right-click -> Quick fix and suggestions will pop-up.

提交回复
热议问题