MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / setSeed

Method setSeed

lab08/tests/speed/StringUtils.java:17–19  ·  view source on GitHub ↗

Sets random seed to L so that results of randomString are predictable.

(long l)

Source from the content-addressed store, hash-verified

15
16 /** Sets random seed to L so that results of randomString are predictable.*/
17 public static void setSeed(long l) {
18 r = new Random(l);
19 }
20
21 /** Returns the next random string of length LENGTH. */
22 public static String randomString(int length) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected