When do activity's instance variables get initialized?

前端 未结 2 1673
说谎
说谎 2021-01-22 03:09

In my android application I have a strange bug. An instance variable like below gets assigned to it\'s default value unexpectedly at run time (in this case - false). When do thi

2条回答
  •  青春惊慌失措
    2021-01-22 03:54

    Java doesn't have "global variables".

    You are talking about instance variables. They are initialized each time a new instance is created.

提交回复
热议问题