KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sloc > TestAbstractClass


1 package sloc;
2
3 /*
4  * This class has a total of 16 useful lines.
5  * This class has a hidden default constructor for 1 line.
6  * This class has a hidden abstract method for Method() for 1 line.
7  */

8 public abstract class TestAbstractClass implements TestInterface {
9     /*
10      * The method has 13 useful lines.
11      * All 'case X:' statements are folded in the switch()
12      * instruction. The last break is ignored.
13      */

14     public void method1() {
15         switch (5) {
16             case 1:
17                 System.out.println(1);
18                 break;
19             case 2:
20                 System.out.println(1);
21                 break;
22             case 3:
23                 System.out.println(1);
24                 break;
25             case 4:
26                 System.out.println(1);
27                 break;
28             case 5:
29                 System.out.println(1);
30                 break;
31             default:
32                 System.out.println("default");
33                 break;
34         }
35     }
36 }
37
Popular Tags