Last active
October 30, 2018 14:27
-
-
Save marcusedu/ddc2983128737c9a3ce7bfd2efa656f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main(){ | |
//Vai compilar | |
dynamic numero = 10; | |
print('Agora a variavel numero é um ${numero.runtimeType} e possui o valor "$numero"'); | |
//Agora vai compilar | |
numero = "Dez"; | |
print('Agora a variavel numero é um ${numero.runtimeType} e possui o valor "$numero"'); | |
//Vai lançar uma exceção em tempo de execução | |
int resultadoSoma = 19 + numero; | |
print('"Dez" + 19 = $resultadoSoma'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment