SyntaxFix
Write A Post
Hire A Developer
Questions
Just having final will have the intended effect.
final
final int x = 5; ... x = 10; // this will cause a compilation error because x is final
Declaring static is making it a class variable, making it accessible using the class name <ClassName>.x
<ClassName>.x