Created
November 8, 2021 20:25
-
-
Save felipecastrosales/924d9b6c2431672f934b149251500f95 to your computer and use it in GitHub Desktop.
Escopo
This file contains hidden or 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
void main() { | |
String superior = 'Superior 01'; | |
void funcaoInterna() { | |
superior = 'Superior 02'; | |
String interna = 'Interna'; | |
} | |
interna = 'Tentando consultar externamente'; | |
// Não executará devido seu escopo estar dentro de `funcaoInterna` | |
// e só poder ser acessado dentro desse mesmo escopo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment