I’m wanting to set a final variable after starting the constant. This works if the variable is not final, but that kind of defeats the purpose.
Can I do something similar to this?
public static final String ASDF = null;
{
ASDF = "asdf";
}
My situation:
public static JSONArray CATEGORIES = null;
{
String str = "";
str += "\"" + FIRST_CATEGORY + "\"";
try {
CATEGORIES = new JSONArray("[" + str + "]");
} catch (JSONException e) {
e.printStackTrace();
}
};
Figured it out. I’m not exactly sure what’s going on here, but it works.