Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はそれを知りたいです,finish();呼び出し効果static変数です.? 変数はstaticGC の影響を受けますか。
finish();
static
static int displayChart = 0;
宣言のコード。
static変数は に属してclassおらず、objectガベージfinish()コレクターは に影響するobjectため、変数には影響しませんstatic。はclass等しくobjectなく、のインスタンスであることに注意してください。objectclass
class
object
finish()
いいえ、finish または gc を呼び出しても static 変数には影響しません。証明のために他のアクティビティからこれらの変数にアクセスできます