John de Michele wrote:Jazy:
Looking at those three keywords, why do you think a variable would be marked as private static final?
John.
jazy smith wrote:please tell me why to use private static final in front of variable ?
If the variable is final, its value will be constant in that class.
So what is the need of static keyword because if the variable is static, it has only one instance throughout the class
Muhammad Ali Khojaye wrote:
Not necessay, unless the variable is immutable.
Vishal Chaudhry wrote:why would someone what a variable to be static, final and also make it private.
Vishal Chaudhry wrote:why would someone what a variable to be static, final and also make it private.
Pat Farrell wrote:No, you don't want to use the evil Singleton Pattern. See many, many threads on this topic
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|