MCPcopy Index your code
hub / github.com/careercup/ctci / randomInt

Method randomInt

java/Chapter 9/Question9_7/Question.java:34–36  ·  view source on GitHub ↗
(int n)

Source from the content-addressed store, hash-verified

32 }
33
34 public static int randomInt(int n) {
35 return (int) (Math.random() * n);
36 }
37
38 public static boolean PaintFill(Color[][] screen, int x, int y, Color ocolor, Color ncolor) {
39 if (x < 0 || x >= screen[0].length || y < 0 || y >= screen.length) {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected