天天看點

IntelliJ idea——》補全分号或大括号:Ctrl+Shift+Enter

版權聲明:本文為部落客原創文章,無需授權即可轉載,甚至無需保留以上版權聲明,轉載時請務必注明作者。

https://blog.csdn.net/weixin_43453386/article/details/84941246

IntelliJ idea——》補全分号或大括号:Ctrl+Shift+Enter

    • 1、 補全分号:`Ctrl+Shift+Enter`
    • 2、補全大括号:滑鼠定位到if語句 ,`Ctrl+Shift+Enter`

1、 補全分号:

Ctrl+Shift+Enter

public class T {
    public static void main(String[] args) {
        String jsonStr = "{\"name\":\"哥哥\",\"age\":12}";
        if (jsonStr == null)
            jsonStr = null;
    }
}
           

2、補全大括号:滑鼠定位到if語句 ,

Ctrl+Shift+Enter

public class T {
    public static void main(String[] args) {
        String jsonStr = "{\"name\":\"哥哥\",\"age\":12}";
        if (jsonStr == null) {

            jsonStr = null;
        }
    }
}