DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVA
how generate a random number in java between 3 and 5
public int getRandomNumber(int min, int max) { return (int) ((Math.random() * (max - min)) + min); }
PREVIOUS
NEXT
Tagged:
#generate
#random
#number
#java
ADD COMMENT
Topic
COMMENT
Name
3+8 =
Submit