I think that the location of these variables depends on how you choose to implement your program design. It takes practice to learn when it makes sense to create a separate class, so don't get frustrated if you don't understand at first. If your main class is getting lengthy and complicated, that is one example of when it is probably time to split things up into separate classes.
You may find these links helpful for deciding when it is appropriate to create separate classes:
http://stackoverflow.com/questions/18806699/when-to-create-helper-methods-and-separate-files
https://softwareengineering.stackexchange.com/questions/154228/why-is-it-good-to-split-a-program-into-multiple-classes
If you are trying to save variables more permanently (i.e. through a device restart, through a device power off) you can use preferences. Replace dataType in these methods below with String, char, int, etc.
//save prefs
public void savePrefs(dataType key, dataType value){
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putDataType(key, value);
editor.commit();
}
//get prefs
private String LoadPreferences(dataType key, dataType value){
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
DataType data = sharedPreferences.getDataType (key, value);
return data;
}