If there are multiple init() functions in a package, don't use in an init() function a global variable that is initialized in another init() function, because the using might be before its initialization which can cause null pointer error.
ZhangZhihui's Blog |
|
||
![]() |
|
博客园
|