I have a long string essentially like below, I want to add each line in the string into the List as its own individual string. In this case for each line, there would be 3 different elements in the List.
String content = "das,fdfd,fdsd,dsds,arer" + "\n" +
"abv,dsds,dsa,wew,ewewew" + "\n" +
"dfdf,wewes,mds,ojop,nsmcd"
while (content.contains("\n")){
list = Arrays.asList(content.split("\n"));
}
System.out.println(list);