class StringTest
{
public static void main(String[] args) throws Exception
{
String s1 = "zhagnsan,lisi,wangwu";
String[] arr = s1.split(",");
System.out.println(arr.length);//这个结果是3
String s="123.jpg";
String[] ss=s.split(".")
System.out.println(ss.length);//结果为什么是零呢?
}
}
|