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

版权声明:本文为博主原创文章,无需授权即可转载,甚至无需保留以上版权声明,转载时请务必注明作者。
https://blog.csdn.net/weixin_43453386/article/details/84941246

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;
        }
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_43453386/article/details/84941246