(Title is misleading since garbage collectors collect only objects, but I found this title more straightforward)
Suppose I have an Android application with
If you are making the variable static so that you can access it from anywhere in your app without creating a new instance of the class every time I believe this is a good candidate for the Singleton pattern.
String userid = Global.getInstance().userid;