import javautilArrayList; import javautilRandom; public class Tes { /** * @param args * * */ public void Test() { String delims = X; String ss = XXX; String x = ; String dd[] = sssplit(delims); for (String me : dd) { delims = x; Systemoutprintln(me); } } public void test() { String testStr = XXX; // Systemoutprintln(testStrsubstring( )); // 第几位字符替换 int position = ; if (testStrlength() > ) { testStr = testStrsubstring( position ) + A + testStrsubstring(position); // Systemoutprintln(testStrsubstring( position)); // Systemoutprintln( testStrsubstring(position)); Systemoutprintln(testStr); } } public void Test() { String delims = X; String ss = XXX; int count = sslength() ssreplace(delims )length(); //判断出现变量数 Systemoutprintln(count); Systemoutprintln(sslength()); Systemoutprintln(ssreplace(delims )length()); for (int i = ; i < ; i++) { Random rdm = new Random(); //创建随机对象 String x = null; int c = (rdmnextInt() >>> ) % ;// x = StringvalueOf(c); String dd = ssreplace(delims x);//替换 Systemoutprintln(dd); for (int j = ; j < count; j++) { } } //字符窜复制 // String tt; // tt= ssstrRep(aaa); } public void test() { String delims = X; String ss = XXX; int count = sslength() ssreplace(delims )length(); //判断出现变量数 Systemoutprintln(count); Systemoutprintln(sslength()); Systemoutprintln(ssreplace(delims )length()); for (int i = ; i < ; i++) { Random rdm = new Random(); //创建随机对象 String x = null; int c = (rdmnextInt() >>> ) % ;// x = StringvalueOf(c); String dd = ssreplace(delims x);//替换 Systemoutprintln(dd); for (int j = ; j < count; j++) { } } } public void test() { String testStr = XXX; String delims = X; for (int s = ; s < ; s++) { for(int i = ;i<;i++) { if (testStrlength() > ) { int count = testStrreplace(delims )length(); int position = count; if(position !=) { Random rdm = new Random(); //创建随机对象 String x = null; int c = (rdmnextInt() >>> ) % ;// x = StringvalueOf(c); testStr = testStrsubstring( position ) + x + testStrsubstring(position); } } Systemoutprintln(testStr); } // if(position !=) // { // for(int i=;i<;i++) //{ // } // } } } public void test() { for(int i=;i<;i++) { Random rd = new Random(); //创建随机对象 String n=; //String num=; int rdGet; //取得随机数 do{ rdGet=Mathabs(rdnextInt())%+; //产生到的随机数(的键位值) //rdGet=Mathabs(rdnextInt())%+; //产生到的随机数(az的键位值) char num=(char)rdGet; String dd=CharactertoString(num); n+=dd; }while(nlength()<);//假如长度小于 // Systemoutprintln(请输入位随机数+n); String testStr = XXX; String delims = X; int count = testStrreplace(delims )length();//判断第几个是X int count = testStrlength() testStrreplace(delims )length(); //判断出现变量数 int position = count; testStr = testStrsubstring( position ) + n + testStrsubstring(); Systemoutprintln(testStr); } } public static void main(String[] args) { Tes t = new Tes(); //tTest(); //ttest(); //tTest(); //ttest(); //ttest(); ttest(); } } |