Java - How to change a 'local?' variable within an event listener
问题 Got a quick question which I hope someone can answer. Basically I have a String variable which needs changing based upon the value in a combo box which has an event listener attached to it. However if I make the string final then it cant be changed, but if i don't make it final then eclipse moans that it isn't final. Whats the best (and simplest) work around? Code is as follows final String dialogOutCome = ""; //create a listener for the combo box Listener selection = new Listener() { public