KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > IfTest5


1 class IfTest5 {
2     public static void main(String JavaDoc[] args) {
3         int x,y;
4                  
5         x=1;
6         y=2;
7         if( x > 2 ) {
8             x = y;
9             if (y > 1) {
10                 x = x+1;
11             }
12             else
13                 x = x-1;
14         }
15         else
16            y = x;
17     }
18 }
19
20
Popular Tags