Java final syntax
By PiRocks, with 2 replies.
Last reply by JL235, over 13 years ago:
You can only assign final class fields outside of a method or constructor (when you declare the field) or in the constructor. Although yes you should use 'init' for applets, the fact is you cannot set your final field there. However the applets constructor should still be called anyway, so you can still set your final variable there.