Hi !!!
I am little bit confused with static final object....i have done a sample pgm,i jst intialized
one final static obj,
after that i called ths static obj,i added two elements.and in my main method(),again i called up
same static object and again i added one element and then i printed its jst printing .
final keyword should not allow to override add elements correct?.can u explain me properly?..
ths is sample code what i created........
Code :import java.util.*; class sortedSet { static final List list = new ArrayList(); void finalMethod(){ list.add("Test"); list.add("Test"); } public static void main(String[] args) { sortedSet set = new sortedSet(); set.finalMethod(); sortedSet.list.add("Sample"); System.out.println("sortedSet.list value !"+sortedSet.list); } }

