im trying to remove values from an arrayList im my android app, but they keep re-appearing.
My arrayList is in a separate class, in my Main Activty I create an instance of that class and remove a value from the array. I exit the Main Activity and return the value re-appears.
My Question is how can I can some kind of static instance of the array class???
//ArrayClass
public class ArrayClass {
public final static ArrayList<String> words = new ArrayList<String>();
public ArrayClass() {
words.add("WORD");
words.add("WORD");
words.add("WORD");
}
//Main Class
ArrayClass wordc = new ArrayClass();
@Override
protected void onCreate(Bundle savedInstanceState) {
wordc.removeWord(0);
}