diff options
Diffstat (limited to 'testData/src/pkg/TestClassLoop.java')
-rw-r--r-- | testData/src/pkg/TestClassLoop.java | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/testData/src/pkg/TestClassLoop.java b/testData/src/pkg/TestClassLoop.java index 25964d9..0ecab7d 100644 --- a/testData/src/pkg/TestClassLoop.java +++ b/testData/src/pkg/TestClassLoop.java @@ -17,47 +17,45 @@ package pkg; public class TestClassLoop { - public static void testSimpleInfinite() { + public static void testSimpleInfinite() { - while(true) { - System.out.println(); + while (true) { + System.out.println(); + } + } + + public static void testFinally() { + + boolean a = (Math.random() > 0); + + while (true) { + try { + if (!a) { + return; + } + } + finally { + System.out.println("1"); + } + } + } + + public static void testFinallyContinue() { + + boolean a = (Math.random() > 0); + + for (; ; ) { + try { + System.out.println("1"); + } + finally { + if (a) { + System.out.println("3"); + continue; } + } - } - - public static void testFinally() { - - boolean a = (Math.random() > 0); - - while(true) { - try { - if(!a) { - return; - } - } finally { - System.out.println("1"); - } - } - - } - - public static void testFinallyContinue() { - - boolean a = (Math.random() > 0); - - for(;;) { - try { - System.out.println("1"); - } finally { - if(a) { - System.out.println("3"); - continue; - } - } - - System.out.println("4"); - } - - } - + System.out.println("4"); + } + } } |