Can we safely implement nextBoolean using nextInt in java?
for example as below,
public static boolean nextBoolean(Random random) { return random.nextInt(2) == 0; }
Aucun commentaire:
Enregistrer un commentaire