Lifetime of a static variable in Android

前端 未结 14 2234

when I declare and initialize a variable as static in my main activity and the activity gets destroyed. Can I still access the content of the variable?

For example t

14条回答
  •  不思量自难忘°
    2020-12-03 10:26

    yes the value which you set in it remains persisted even after the activity closes but not after the application closes.

提交回复
热议问题