KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ReachingDefs


1 public class ReachingDefs {
2     public static void main (String JavaDoc [] args) {
3         ReachingDefs rdt1 = new ReachingDefs();
4         rdt1.m(8);
5         rdt1.n();
6     }
7     public void m(int i){
8         int x = 4;
9         int y = 3;
10         if (i < 10) {
11             x = 5;
12         }
13         else {
14             x = 7;
15             y = 18;
16         }
17         int j = x * y;
18     }
19     public void n(){
20         int x = 9;
21         int y = 0;
22         while (x < 10){
23             y = x + 3;
24             x = x + 1;
25         }
26         int z = x + 2;
27     }
28 }
29
Popular Tags