Reply to
:
You can assign it a value that is specific to the object instance, which you can’t do with a static class variable.
so you mean when i write the class i just declare it as final. and when i have instantiated the class and call a method, the method will assign a value to it which cannot be changed?
I think you need to assign a value in the constructor, otherwise the compiler will throw an error.
If you enjoyed my content for some reason, I'd love to hear from you! Here are some options:
- You can buy me a coffee!
- You can write a reply on your own site and submit the URL as a webmention via the form below.
- Or you can just contact me!