Skip to content

Instantly share code, notes, and snippets.

@mrnirva
Created May 27, 2020 03:53
Show Gist options
  • Save mrnirva/ec97b3dce1a3ff3aecb3216cc2702b88 to your computer and use it in GitHub Desktop.
Save mrnirva/ec97b3dce1a3ff3aecb3216cc2702b88 to your computer and use it in GitHub Desktop.
import java.util.concurrent.ThreadLocalRandom;
int minimum = 10;
int maksimum = 25;
int randomSayi = ThreadLocalRandom.current().nextInt(minimum, maksimum + 1);
/* Maksimuma 1 eklememizin sebebi nextInt() metodu maksimum değeri dahil
etmiyor bu nedenle 1 ekleyerek 25 dahil olacak şekilde sayı üretebiliriz. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment