I’m trying to make a simple list.
I’ve got this:
String valuesArray[] = {"473", "592", "1774", "341", "355", "473", "950", "500", "44", "946.35", "750", "950"};
List<String> valueList = Arrays.asList(valuesArray);
Whenever I try to add something to the list, it force closes.
valueList.add("Test");
And it really seems to only happen when I try to add to the list. I’m able to get values from the list, just not add to it.
As you can see from the docs for
Arrays.asList(), theListreturned from that method is fixed size. If you want something more versatile, you might try: