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
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-28494-1.html
再一个咱们国家的大型舰艇应该继续建造