Possible Duplicate:
Why are only final variables accessible in anonymous class?
private void printPrize(final int f,final int f1){  
        System.out.println("f  "+ f+" f1 "+ f1);  
        TT t= new TT(){  
            @Override  
            public int count() {  
               return calculateCount(f, f1);  
            }  
        };  
        t.getCount();  
    }  
i force to mark f and f1 as final to access them in the anonymous class. Why is this?
Thanks
 
    