import junit.framework.Assert;
import android.test.AndroidTestCase;
import android.util.Log;public class TestService extends AndroidTestCase
{
public void testAdd()
{ String str = "123$$456";
String[] infoStrings = str.split("$$");
Log.w("TestService", str + "=>" + Integer.toString(infoStrings.length));
Assert.assertEquals(infoStrings.length, 2);
/**
 * 为什么这里返回的 infoStrings 为 1 不是 2 呢
 */
} public void testAdd2()
{ String str = "123##456";
String[] infoStrings = str.split("##");
Log.w("TestService", str + "=>" + Integer.toString(infoStrings.length));
Assert.assertEquals(infoStrings.length, 2);
/**
 * 这里返回的 infoStrings 为正确的 2
 */
}
}"123$$456".split("$$")的结果长度为什么为1?为什么