Intellij idea 快捷键2--生成常用代码
来源:互联网 发布:央行网络支付新规 编辑:程序博客网 时间:2024/05/17 06:47
使用Intellij idea 开发的时候,使用快捷键快捷生成我们想写的代码。
接下来记录几个常用的:
psvm 生成main 方法
public static void main(String[] args) {}
psf 生成公共静态final
public static final
psfi 生成公共静态 final int
public static final int
psfs 生成公共静态final String
public static final String
sout 生成控制台输出
System.out.println();
这么多怎么记?
老司机叫你-->记首字母!
在使用Intellij idea 开发过程中,一些快捷生成代码块的操作简直是不能再爽more 了, 而且会让你感觉使用起来非常自然,非常舒服。
一个点引出,再加上常用的自动补全 ctrl +shift + enter , 开发效率奇快.
1.对于String 类型
"test".sout //输出System.out.println("test");
"test".cast //转换((光标位置) "test")
"test".field //
"test".format //字符串格式化String.format("test", 光标位置)
"test".inst || "test".instanceof"test" instanceof ? ((光标位置) "test") : null;
"test".nn"test".notnull
if ("test" != null) { }
"test".nullf ("test" == null) { }
"test".par("test")
"test".returnreturn "test";
"test".synchronizedsynchronized ("test") { }
"test".trytry { "test"} catch (Exception e) { e.printStackTrace();}
"test".var
2.对于boolean类型
可以看到一个"." 就能引出相关的快捷方法,不细表.
3.对于数值类型
增加for循环快捷.如图:
总:intellij idea 的快捷生成代码使整个编码过程非常的流畅,没有断裂感, 一个点 引出一串思路呀~~
阅读全文
0 0
- Intellij idea 快捷键(2)--生成常用代码
- Intellij idea 快捷键2--生成常用代码
- Intellij idea 快捷键(3)--生成常用代码
- Intellij IDEA快捷生成常用代码
- IntelliJ IDEA快捷键(常用)
- IntelliJ IDEA快捷键(常用)
- Intellij Idea 常用快捷键
- IntelliJ IDEA 常用快捷键
- IntelliJ Idea 常用快捷键
- Intellij IDEA 常用快捷键
- Intellij idea常用快捷键
- IntelliJ Idea 常用快捷键
- IntelliJ Idea 常用快捷键
- Intellij IDEA常用快捷键
- IntelliJ idea常用快捷键
- intellij idea 常用快捷键
- IntelliJ Idea常用快捷键
- IntelliJ IDEA 常用快捷键
- html表单标签
- 登录界面+验证码
- [LeetCode]Concatenated Words
- 116. Populating Next Right Pointers in Each Node
- 量化进阶——京东量化教你如何操作期限套利
- Intellij idea 快捷键2--生成常用代码
- HDU2041超级楼梯
- html框架标签
- mysql约束
- sql中的case when
- 动态创建表格
- 随机更换窗体背景
- 改善Java程序的151个建议 笔记
- 用JTree类实现日历