String.Split method to "." Segmentation

xiaoxiao2021-03-06  40

Below the following code

Public static void testsplite () {

String Num = New String ("23232.45454.77");

String a [] = num.split (".");

System.out.println ("SSS:" a.length;

For (int i = 0; i

System.out.println (i ":" a [i]);

}

}

There is no result, one track, found A.Length = 0. So I check the API, the parameters of Spilit are regular expressions.

Modify to string a [] = Num.split ("//."); Everything is OK.

转载请注明原文地址:https://www.9cbs.com/read-68833.html

New Post(0)