vendredi 13 décembre 2019

int number = (int)Math.random();

A simple question about notation.

For what reason do I have to write "int" in parentheses after the equals sign since otherwise compiling fails?

    int number = (int)Math.random();

Why does not compiler recognize second "int" as the first one in the same line?

Thanks for help!




Aucun commentaire:

Enregistrer un commentaire