My string when printed looks like:
line1
line2
line3
as it's a extracted with selenium and it looks in html:
line1
<br>
line2
<br>
line3
<br>
I want to transform that string to list of 3 elements, i tried the following:
List<String> test= new ArrayList<String>(Arrays.asList(mystring.split("<br>")));
but it did not work i got a list of 1 element as follows:
[line1
line2
line3]
") without additional external ArrayList. – cool Jul 26 '20 at 09:42