问题描述
在上一次我经常用这种形式初始化数组: int [] test = new int [] {1 ,2,3};
当我输入'['时,NetBeans立即放置右大括号。
现在的问题是 - 哪个宏是用花括号做同样的工作的?解决方案
int [] test = new int [] {1 ,2,3};
当我输入'['时,NetBeans立即放置右大括号。
现在的问题是 - 哪个宏是用花括号做同样的工作的?解决方案
从菜单工具> 选项中选择工具栏中的编辑器,进入代码完成标签。
您会看到自动插入关闭方括号已被默认自动选中。
有一个人,一段时间以前,一个类比问题。没有有用的答案。我想这意味着我们应该在未来的版本中寻找。
In the last time I often initialize arrays in this form :
int[] test = new int[]{1,2,3};
When I type '[', NetBeans immediately put the closing brace.
The question is - which is the macro to do the same job with curly braces ?
Select from menu Tools > Options, select Editor in toolbar, go for Code Completion tab.You will see that Insert Closing Brackets Automatically is already automatically checked by default.
There was a guy, who asked an analogical question a while ago. There was no helpful answer. I guess that means that we should look for that in future versions.
这篇关于NetBeans花括号自动关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!