javaclass

tests/SwitchTest.java

132:14c7f90abf1b
2005-01-18 Paul Boddie Added a main method test program.
     1 public class SwitchTest {     2      3     public int test(int x) {     4         switch (x) {     5             case 0:     6      7             case 1:     8             x = x + 10;     9             break;    10     11             case 2:    12             x = x + 20;    13             break;    14     15             default:    16             break;    17         }    18     19         return x;    20     }    21 }