stringtokenizerstringtokenizer
There is an issue with StringTokenize ...
Split have to use regex, StringTokenizer is using String or CharSequence,
but
"a.b..".split(".") will return {"a","b",""}
and StringTokenizer of "a.b.." ... will return only {"a","b"}
And this is very tricky!!! Be Carefull!!!
Better and safer alternatives to StringTokenizer are:
Much better StrongTokenizer is in org.apache.common.lang3 ... it have much more flexibility or
com.google.common.base.Splitter
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-28494-1.html
因为穷人在今后中国的发展过程中根本不能多生
有朋友问