在知乎上看到一回答

public static void main(String ... args) {
	    System.out.println(randomString(-229985452)+' '+randomString(-147909649));
	}
	public static String randomString(int seed) {
	    Random rand = new Random(seed);
	    StringBuilder sb = new StringBuilder();
	    for(int i=0;;i++) {
	        int n = rand.nextInt(27);
	        if (n == 0) break;
	        sb.append((char) ('`' + n));
	    }
	    return sb.toString();
	}

跑了一下。。。麻辣个鸡的。。。

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required

This site uses Akismet to reduce spam. Learn how your comment data is processed.