Skip to content

Commit 4341316

Browse files
authored
Created NotRandom.java
1 parent 6d20963 commit 4341316

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

NotRandom.java

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
public class NotRandom{
2+
public static void main(String ... args) {
3+
System.out.println(randomString(-229985452)+' '+randomString(-147909649));
4+
}
5+
6+
public static String randomString(int seed) {
7+
Random rand = new Random(seed);
8+
StringBuilder sb = new StringBuilder();
9+
for(int i=0;;i++) {
10+
int n = rand.nextInt(27);
11+
if (n == 0) break;
12+
sb.append((char) ('`' + n));
13+
}
14+
return sb.toString();
15+
}
16+
}//printing hello world without actually printing it.

0 commit comments

Comments
 (0)