Is there any method created in Java that separates the string into an array or list by comma? Or do I have to make the code myself?
string java collections split
List<String> items = Arrays.asList(str.split("\\s*,\\s*"));
If you do this, separate it into commas and put in strings.
© 2024 OneMinuteCode. All rights reserved.