java中Split()的用法

java中Split()的用法

String s = "搭拆123-456-789-0123";
String arr[] = s.split("-");

得到的arr[]就弯枝丛是埋樱数组{123,456,789,0123}
← 上一篇: 下一篇: →