KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > FieldUnary


1 public class FieldUnary {
2
3     private int count = 9;
4
5     static FieldUnary getThis(){
6         return new FieldUnary();
7     }
8
9     public static void main(String JavaDoc [] args){
10         System.out.println(getThis().count += 1);
11         Inner i = new FieldUnary().new Inner();
12         i.run();
13     }
14
15     class Inner {
16         public void run(){
17             System.out.println(getThis().count += 1);
18         }
19     }
20 }
21
Popular Tags