I have seen these two methods of using ItemListener. I am curios which is better and why. What are the differences?
ItemListener a;
Choice ce = new Choice();
ce.addItemListener(a);
ItemListener itemlistener = new ItemListener();
itemlistener.handle = checkboxmenuitem;
checkboxmenuitem.addItemListener(itemlistener);