Question : Java split string into list
Answered by : marcello
List<String> list = new ArrayList<String>(Arrays.asList(string.split(" , ")));
// string.split also accept regular expressions
Source : https://stackoverflow.com/questions/7488643/how-to-convert-comma-separated-string-to-list | Last Update : Fri, 29 Oct 21
Question : split string into array java
Answered by : courageous-camel-y4vfpr8cix55
String[] array = values.split("\\|", -1);
Source : https://stackoverflow.com/questions/14414582/java-split-string-to-array | Last Update : Tue, 10 Nov 20
Question : java how to split a string to array
Answered by : inna-kim
String str= "abcdef"; String[] array=str.split("(?<=\\G.{2})"); System.out.println(java.util.Arrays.toString(array));
Source : | Last Update : Mon, 11 Apr 22
Question : string split to list java
Answered by : terrible-teira-k18qimt7eb4x
List<String> list = new ArrayList<String>(Arrays.asList(scanner.nextLine().split(", ")));
Source : | Last Update : Fri, 11 Nov 22