public static Double money ( int maxDollars ) { int dollars = RandomUtils . nextInt ( maxDollars + 1 ) ; int cents = RandomUtils . nextInt ( 100 ) ; Double d = new Double ( dollars + "." + cents ) ; return d ; }
Random dollar amount starting at zero