+ 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 Answer
+ 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