The method {@code nextBoolean} is implemented by class {@code Random}as if by:
{@code}public boolean nextBoolean() return next(1) != 0; }}@return the next pseudorandom, uniformly distributed{@code boolean} value from this random number generator'ssequence @since 1.2
InputMismatchException
if the next token cannot be translated into a valid boolean value. If the match is successful, the scanner advances past the input that matched.
@return the boolean scanned from the input
@throws InputMismatchException if the next token is not a valid boolean
@throws NoSuchElementException if input is exhausted
@throws IllegalStateException if this scanner is closed
boolean
value from this random number generator's sequence.
@return the next pseudorandom, uniformly distributedboolean
value from this random number generator's sequence
boolean
value from this random number generator's sequence.
@return the next pseudorandom, uniformly distributedboolean
value from this random number generator's sequence
|
|
|
|
|
|