原帖:http://my.oschina.net/artshell/blog/199965
throw关键字
Java代码:
1
2
3
4
|
public
void
XXX()
throws
Throwable{
throw
new
Throwable();
System.out.println(
"test"
);
}
|
return关键字
Java代码 :
1
2
3
4
|
public
void
XXX() {
return
;
System.out.println(
"test"
);
}
|
continue关键字
Java代码:
1
2
3
4
5
6
|
public
void
XXX() {
for
(
int
i=
0
; i<
10
; i++) {
continue
;
System.out.println(
"test"
);
}
}
|
break关键字
Java代码:
1
2
3
4
5
6
7
8
|
public
void
XXX() {
for
(
int
i=
0
; i<
10
; i++) {
if
(i==
5
) {
break
;
System.out.println(
"test"
);
}
}
}
|
while(true)
Java代码:
1
2
3
4
|
public
static
void
XXX() {
while
(
true
);
System.out.println(
"when?"
);
}
|