Skip to content

Instantly share code, notes, and snippets.

Created November 19, 2012 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4108479 to your computer and use it in GitHub Desktop.
Save anonymous/4108479 to your computer and use it in GitHub Desktop.
package split;
public class Split {
public static void main(String[] args) {
System.out.println(splitstring("hello name is George", 0));
}
static String []a = new String[1000000];
public static Class<split.a[]> splitstring(String sentence, int i){
sentence= sentence.substring(i,i+1);
if( sentence.equals(" ")){
a[i] = ",";
}
else{
a[i] = sentence;
}
while(sentence.length() >=0){
Class<split.a[]> splitstring;
splitstring = splitstring(sentence.substring(i+1, i+2), i+1);
}
return a[].class;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment