package lys.test;
import java.util.Random;
public class Jiaoyanma {
public static void main(String[] args) {
/*
* int m = 0; for(int i = 0; i < 10; i++){ int c = i<<16; for(int j = 0;
* j < 16; j++){ if((c&0x80000000) != 0){ c = c<<1; c = c^0x04C11DB7;
* m++; } else{ c = c<<1; } }
* System.out.println(Integer.toHexString(c)); }
* System.out.println("m的值为::"+m);
*/
// getRandomString(10);
String a=getRandomString1(10);
System.out.println(a);
}
//方法1
public static String getRandomString(int length) {
String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Random rd = new
import java.util.Random;
public class Jiaoyanma {
public static void main(String[] args) {
/*
* int m = 0; for(int i = 0; i < 10; i++){ int c = i<<16; for(int j = 0;
* j < 16; j++){ if((c&0x80000000) != 0){ c = c<<1; c = c^0x04C11DB7;
* m++; } else{ c = c<<1; } }
* System.out.println(Integer.toHexString(c)); }
* System.out.println("m的值为::"+m);
*/
// getRandomString(10);
String a=getRandomString1(10);
System.out.println(a);
}
//方法1
public static String getRandomString(int length) {
String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Random rd = new