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
A better nice codding way :
public class FinalVarTester
{
static final JButton button;
public FinalVarTester()
{
JFrame frame = new JFrame();
Container container = frame.getContentPane();
container.setLayout(new BorderLayout());
container.add(button, BorderLayout.SOUTH);
button = new JButton("OK");
}
public static void main(String[] args)
{
FinalVarTester vTester = new FinalVarTester();
}
}