when do we use static variable other than for using without creating a reference I just declared a variable as static it was having problems but could not make out the reason then i removed the static it worked fine what is the reasonprivate static ListModel listModel; private static JList jlist; private static JPanel mainPanel; private static int index; //Do we need a variable for maintaining default model //private static ListModel defaultModel;