java split in splitting the data, the operation of the null data

1  empty after no comma separated, i.e. after the comma empty To convert a set of three elements
 2  
. 3   List <String> List = Arrays.asList (s1.split ( ",", - 1 ));
 . 4 after only with the condition, -1 is added to the results of conversion as follows
 . 5  
. 6 [a, B,]

 

Guess you like

Origin www.cnblogs.com/xiaoyue1606bj/p/11577009.html