Java - final variables
问题 I know that once a final variable has a value assigned to it, it cannot be changed. However I just have a couple of questions regarding this: When I have a field, say static final JButton button; outside a class, and then in the main method, try to assign it a value, button = new JButton("OK"); , I get an error telling me to remove the final modifier? However since the original button variable does not yet reference an object I was under the impression I could assign it once? Secondly, if I