How convert following String
with string values to List<String>
:
[null,294,160,199,105]
How convert following String
with string values to List<String>
:
[null,294,160,199,105]
Here is a simple way to do it:
List<String> result = Arrays.asList(
input.substring(1, input.length() - 1).split(",")
);
I'm not sure but you can try this one...
List<String> lst = new ArrayList<String>();
for (String field : inputStr.split(","))
lst.add(field);
I would suggest to take a look at the following API:
You should find there enough information to solve this on your own.