Computer Science, asked by kritzz1627, 10 months ago

Can access modifiers be used for local variables in Java?

Answers

Answered by sailorQueen
0

In java, Local variables can't use any of the access modifiers.. local variable can work in only inside the method.

Local variables are not assigned a default value, that's why they need to be initialized ..

Final is the one and only non access modifier that can be applied to local variable.

Similar questions