简体   繁体   English

如何将IntelliJ中的常量默认为私有?

[英]How can I default constants in IntelliJ to private?

When I am creating a constant in IntelliJ (using Ctrl+Alt+C), by default it is public static final . 当我在IntelliJ中创建常量时(使用Ctrl + Alt + C),默认情况下它是public static final How can I make it private static final instead? 我怎样才能使它成为private static final

After Ctrl + Alt + C , press this shortcut again, which shows dialog with more options. 按Ctrl + Alt + C后 ,再次按此快捷键,显示包含更多选项的对话框。

There is a visibility section. 有一个能见度部分。 If you select private here, it will be the new default when extracting constants the next time. 如果您在此处选择private,则在下次提取常量时它将是新的默认值。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM