Java examples for Language Basics:String
Convert String to String Array with split method
public class Main { /*from w w w. jav a2 s. com*/ public static void main(String args[]){ String str = "Java String to String Array Example"; String strArray[] = str.split(" "); System.out.println("String converted to String array"); for(int i=0; i < strArray.length; i++){ System.out.println(strArray[i]); } } }