I am new in the world of android. i am developing an android app where i need to use some static field and some final static field. As it concern with performance of application.i have done search on this topic
1.what will be effect on memory and performance
2.How garbage collection work while handling with static or final static field.
1)There's no perf penalty for a variable being static. It will take the same amount of memory as a non static variable.
2/3)A variable in a static field cannot be garbage collected unless the class itself is kicked out of memory. In practical terms, it will never happen. TO have it be collected, you'd need to overwrite the variable to another value (which would then be uncollectable) or null.
Static final fields are constants. They can't be overwritten, so they will never be collected.