Local variables | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Local variables

please explain the difference: ā€¢ Local variables are visible only within the declared method, constructor or block. ā€¢ Local variables are implemented at stack level internally.

22nd Jun 2017, 1:47 AM
Viį»‡t HĘ°ng Khį»•ng
Viį»‡t HĘ°ng Khį»•ng - avatar
1 Resposta
+ 1
They're both function of the local variables. It's true that you can't call local variables outside of the block. Accessing them is quite faster because it is implemented at stack level internally.
22nd Jun 2017, 1:53 AM
AJ Carlos
AJ Carlos - avatar