Why is the use of static final variables recommended to declare constants only on final variables? Using static sounds is logical when there are many instances of the class, but this argument is correct when used for Android activity. In fact, since the class instance will be around even after the operation is completed and, ultimately, garbage collection, it seems that all these constants will still be in memory until the class loader is started.
Also, does the built-in non-static compiler final variables (ints and String) contain exactly the same as for static final variables?
source
share