Created
May 27, 2020 03:53
-
-
Save mrnirva/ec97b3dce1a3ff3aecb3216cc2702b88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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