Get Some Free Products at your Door Step. Just feed ur Address in dis Link...!!

Saturday, March 31, 2012

WordSeperator

public class WordSeperator
{
public static Object[] seperater(String source)
{
String word;
int start=0,end=0;
ArrayList a=new ArrayList();
for(int pos=0;pos {
if(source.charAt(pos)==' ')
{
end=pos;
word=source.substring(start, end);
if(word.length()>1)
a.add(source.substring(start, end));
start=end+1;
}
}
a.add(source.substring(end+1, source.length()));
return a.toArray();
}
}

No comments:

Post a Comment