Skip to content

Ex3_NumerosAleatorios - random.nextInt() #50

Open
@haldirleao

Description

@haldirleao

Olá @cami-la ,

No Ex3_NumerosAleatorios, para gerar números aleatórios de 0 a 100, acho que:

Esta linha:
int numero = random.nextInt(100);

Deveria ser alterada para:

int numero = random.nextInt(101);

Observe a descrição do método random.nextInt():

Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.

PS.: Ocorre o mesmo no Ex4_ArrayMultidimensional.

Agradeço verificar e comentar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions