Quick question. The field size of Alphabet_SIZE is declared as Static. My question is
- Is it mandatory to declare the variable static ? Can I just declare the variable without using static?
Thank you
Quick question. The field size of Alphabet_SIZE is declared as Static. My question is
Thank you
If you do not make it static, then each instance of the class will have a field with that value wasting storage space. It is not mandatory but there is no good reason to remove static
. Basically: static means one for the whole class, otherwise you have one per instance.