The result of the calculation, that is the parameter of the random() method's return statement will contain a floating point value between 1 and 2 inclusive. Because the method random() returns an int, the compiler should give a warning, something about loss of precision, but that's not at issue here. The return value of random() will be an integer with the value of either 1 or 2. The problem you have is that you don't know what rounding function will be used, because a specific rounding function is not used. If the default rounding function is not floor or ceiling, the return value of the random() method will return 1 or 2 with equal probability. If this is true, simply subtract 1 from the return value of the random() method and go home for dinner. If the default rounding is floor or ceiling, order pizza and tell your wife it'll be another late night in the office.