posted 24 years ago
Which of the following cannot be used in declaring and initializing an automatic (method local) variable?
A. Final
B. Public
C. Constants of non-primitive type
D. Inner class from other scopes
E. Initialized arrays(such as "{Hello", "Goodbye"})
I think the answer is B since the local variables LOCAL to the block of code. I am not very sure about option c. Can anyone explain?
Thanks in advance !!
Milind