Which cannot be used in declaring and initializing an automatic (method call) variable? A. Final B. Public C. Constants of non-primitive type D. Inner class from other scopes E. Initialized arrays(such as "{Hello", "Goodbye"})
Apparently only one: public - No meaning in that context. The others: final - Legal. Can be handy esp. with local (inner) classes... Constants of non-primitive type - Here is one legal: final String s = "ABC"; Inner class from other scopes - Here is a legal one: Outer.Inner oi = new Outer().new Inner(); Initialized arrays(such as "{Hello", "Goodbye"}) - Legal. Just like with any other array type.
I hope I understood the question correctly!
Tony Alicea Senior Java Web Application Developer, SCPJ2, SCWCD
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Thank you Tony
Tony Alicea
Desperado
Sheriff
Joined: Jan 30, 2000
Posts: 3219
posted
0
You are welcome... and I'd like to take the opportunity to thank Jim Yingst for his participation here. He is a Java programmer that knows his stuff (including the JLS!!) :-) And it's very nice of him to share his knowledge with everyone else here. That's what we pay him $100,000/yr for. Ha ha!
Ha! In Monopoly money, maybe. Anyway, glad to be here. I was looking at this forum anyway, and once I saw that you were making the move, and there are other knowledgable people like Paul and Frank fielding questions, I figured this was looking like a more interesting place to hang out. And thank you for taking on the moderator role. Things are looking good here. Cheers!
"I'm not back." - Bill Harding, Twister
Tony Alicea
Desperado
Sheriff
Joined: Jan 30, 2000
Posts: 3219
posted
0
Monopoly Money!? Good for you! Because I guess that means MICROSOFT STOCK!!! Ha ha!!! No; I'm not anti Microsoft! I don't want to be persecuted by them! I'd rather have the GOVERNMENT on my back than MS!! (Yet Another MS Joke!)