java string split .

如果要split “.”的话,要用转义,不然得到的会是[]

String aa = "demo-provider.tar";
String[] b = aa.split("\\.");

猜你喜欢

转载自vilight.iteye.com/blog/1933289