KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hanseltest > CoverSwitchBug


1 package org.hanseltest;
2
3 public class CoverSwitchBug {
4    private int anInt;
5
6    public void aCase(int i) {
7        switch (i) {
8            case -1:
9                anInt = 100;
10                break;
11            case 1:
12                anInt = 10;
13                break;
14            default:
15                anInt = -1;
16                break;
17        }
18    }
19 }
20
21
22
Popular Tags