Convert space Separated String To List - Android java.lang

Android examples for java.lang:String Join

Description

Convert space Separated String To List

Demo Code

import java.util.Arrays;
import java.util.List;

public class Main {

  public static List<String> spaceSeparatedStringToList(String spaceSeparatedString) {
    return Arrays.asList(spaceSeparatedString.split("\\s+"));
  }/*  ww  w.  j  a  v a 2 s .com*/

}

Related Tutorials