Skip to content

Instantly share code, notes, and snippets.

@mrnirva
Last active May 27, 2020 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrnirva/48b8c24a3511b18a3387dd20f6d038a9 to your computer and use it in GitHub Desktop.
Save mrnirva/48b8c24a3511b18a3387dd20f6d038a9 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);
// Alttaki şekilde kullanırsanız maksimum değeri de dahil edecektir.
randomSayi = ThreadLocalRandom.current().nextInt(minimum, maksimum + 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment