I am attempting to display a time on a JLabel and when I attempt to create a timer where the run() method changes the text, it is expecting my time variable to be a final one element array as seen below:
Why is timeDown supposed to be final?
I am attempting to display a time on a JLabel and when I attempt to create a timer where the run() method changes the text, it is expecting my time variable to be a final one element array as seen below:
Why is timeDown supposed to be final?
Variables accessed in an anonymous class which are defined in the enclosing scope must be final or effectively final.
See: https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html