I think str.split(" ") would work too.


LinkedList<String> ll = new LinkedList<String>();
for (int i =0; i < s.length; i++)
{
ll.add(s[i]);
}