KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > LocalAssigns


1 public class LocalAssigns {
2
3     private int x = 9;
4     public static void main(String JavaDoc [] args){
5         LocalAssigns la = new LocalAssigns();
6         la.run();
7     }
8
9     public void run(){
10         int y = 0;
11         y = x;
12         System.out.println(y);
13         y += 9;
14         System.out.println(y);
15         y -= 9;
16         System.out.println(y);
17         y *= 9;
18         System.out.println(y);
19         y /= 9;
20         System.out.println(y);
21         y %= 9;
22         System.out.println(y);
23         y >>= 9;
24         System.out.println(y);
25         y >>>= 9;
26         System.out.println(y);
27         y <<= 9;
28         System.out.println(y);
29         y |= 9;
30         System.out.println(y);
31         y &= 9;
32         System.out.println(y);
33         y ^= 9;
34         System.out.println(y);
35     }
36 }
37
Popular Tags