You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
842 B
46 lines
842 B
10 years ago
|
package pkg;
|
||
10 years ago
|
|
||
|
|
||
|
public class TestClassLoop {
|
||
|
|
||
10 years ago
|
public static void testSimpleInfinite() {
|
||
|
while(true) {
|
||
|
System.out.println();
|
||
|
}
|
||
|
}
|
||
|
|
||
10 years ago
|
public static void testFinally() {
|
||
|
boolean var0 = Math.random() > 0.0D;
|
||
|
|
||
|
while(true) {
|
||
|
try {
|
||
|
if(!var0) {
|
||
|
return;
|
||
|
}
|
||
|
} finally {
|
||
|
System.out.println("1");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static void testFinallyContinue() {
|
||
|
boolean var0 = Math.random() > 0.0D;
|
||
|
|
||
|
while(true) {
|
||
|
while(true) {
|
||
|
try {
|
||
|
System.out.println("1");
|
||
|
break;
|
||
|
} finally {
|
||
|
if(var0) {
|
||
|
System.out.println("3");
|
||
|
continue;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
System.out.println("4");
|
||
|
}
|
||
|
}
|
||
|
}
|