文章目录
java idea常用的快捷方式
快速复制
c t r l + d \color{red}{ctrl+d} ctrl+d
选多行改变
A l t + 鼠标 \color{red}{Alt+鼠标} Alt+鼠标
代码格式化
C t r l + A l t + l \color{red}{Ctrl+Alt+l} Ctrl+Alt+l
快速代码编辑
psvm
public static void main(String[] args){
}
sout
System.out.println();
5.for
解释:输入 5. f o r \color{red}{5.for} 5.for,定义一个从 i = 0 \color{red}{i=0} i=0到 i < 5 \color{red}{i<5} i<5的循环。
for (int i = 0; i < 5; i++) {
}
arr.for
解释:已知一个arr的数组,输入 a r r . f o r \color{red}{arr.for} arr.for,定义一个从 i = 0 \color{red}{i=0} i=0到 a r r . l e n g t h \color{red}{arr.length} arr.length的循环。
for (int i = 0; i < arr.length; i++) {
}
快速死循环
C t r l + A l t + t \color{red}{Ctrl+Alt+t} Ctrl+Alt+t
快速补全代码
A l t + E n t e r \color{red}{Alt+Enter} Alt+Enter
当方法还没创建的时候
A l t + E n t e r \color{red}{Alt+Enter} Alt+Enter快速创建方法。
抽取具有一定功能的代码变成方法
C t r l + A l t + M \color{red}{Ctrl+Alt+M} Ctrl+Alt+M
快速得到getXxx和setXxx
A
l
t
+
i
n
s
e
r
t
\color{red}{Alt+insert}
Alt+insert
点击
G
e
t
t
e
r
\color{red}{Getter}
Getter
a
n
d
\color{red}{and}
and
S
e
t
t
e
r
\color{red}{Setter}
Setter
全部选中点击
o
k
\color{red}{ok}
ok
查看代码继承
C
t
r
l
+
A
l
t
+
S
h
i
f
t
+
U
\color{red}{Ctrl + Alt + Shift + U}
Ctrl+Alt+Shift+U
学的不是技术,更是梦想!!!