guess a number between 1 and 10 in java using math.random code example Example: math.random java between 1 and 10 ((int) (Math.random()*(maximum - minimum))) + minimum;