Out rapid generation method, main methods, for loop, foreach loop
1、System.out.println()
输入sout,按下enter键,生成System.out.println()方法.
sout--->soutv=System.out.println("变量名 = " + 变量)
soutp--->System.out.println("")
2、public static void main(String [] args){}
输入psvm,按下enter键,生成main方法.
3、for(int i=0;i<;i++){}
//输入fori,按下enter键,生成for循环
//输入100.fori,快速生成100次for循环
for (int i = 0; i < 100; i++) {
}
4、for(Object o: ){}
输入iter,按下enter键,生成foreach循环.
5, for reverse circulation for (int i = a1.length - 1 ; i> = 0; i -) {}
Input数组名.forr
idea common shortcuts
hot key | Features |
---|---|
Alt + Enter | Introducing package, automatic correction codes |
Ctrl+Y | Delete cursor line |
Ctrl+D | Copying the contents of the line cursor, the cursor position following insertion |
Ctrl+Alt+L | Formatting code |
Ctrl+/ | Single-line comments, and then uncomment |
Ctrl+Shift+/ | Select the code comments, multi-line comments, and then uncomment |
Alt+Insert | Automatic code generation, toString, get, set or the like |
Alt + Shift + down arrow | Move the current line of code |
Reference links
https://blog.csdn.net/fanrenxiang/article/details/79590838