I have a String s = "Tom Jack";
I want to create a string stream associated with s and get two Strings
s1 = "Tom" and s2 ="Jack";
How can I do this job? thanks.
g*****g 发帖数: 34805
2
s.split("\s")
【在 r*******y 的大作中提到】 : I have a String s = "Tom Jack"; : I want to create a string stream associated with s and get two Strings : s1 = "Tom" and s2 ="Jack"; : How can I do this job? thanks.