I need to split my String by spaces. For this I tried:
str = \"Hello I\'m your String\";
String[] splited = str.split(\" \");
But it doesn\
if somehow you don't wanna use String split method then you can use StringTokenizer class in Java as..
StringTokenizer tokens = new StringTokenizer("Hello I'm your String", " ");
String[] splited = new String[tokens.countTokens()];
int index = 0;
while(tokens.hasMoreTokens()){
splited[index] = tokens.nextToken();
++index;
}