KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > FieldGets


1 class C {
2     int x;
3 }
4
5 public class FieldGets {
6
7     public static void main(String JavaDoc[] args) {
8         C c = new C();
9         c.x = 3;
10         int i = 7;
11         int j = 8;
12         c.x = i + j;
13         System.out.println(c.x);
14         System.out.println(c.x);
15         System.out.println(c.x);
16     }
17 }
18
19
Popular Tags