È possibile farlo?Come verificare se un doppio è un numero intero
double variable;
variable = 5;
/* the below should return true, since 5 is an int.
if variable were to equal 5.7, then it would return false. */
if(variable == int) {
//do stuff
}
so il codice probabilmente non va qualcosa di simile, ma come fa è andata?
C# ma simile in Java: http://stackoverflow.com/a/4077262/284240 ([Integer.MAX_VALUE] (http://docs.oracle.com/javase/1.4.2/docs/api/java /lang/Integer.html#MAX_VALUE)) –
Cosa vorresti ottenere da questo? 'double' e' int' sono rappresentati in memoria in modo diverso, e userete uno o l'altro in base al contesto della gestione della memoria. – Makoto
if (num% 1 == 0) –