Is there a method like the rng.randint()
in the code below for Java?
Are Math.random() o java.util.Random viable for this aim?
...
rng.seed(random_seed)
child1, child2 = parents
const1 = child1.const_set
const2 = child2.const_set
cp1 = rng.randint(1, len(const1) - 1) if len(const1) > 1 else 0
cp2 = rng.randint(1, len(const2) - 1) if len(const2) > 1 else 0