Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.189 :

Posted: Tue Apr 03, 2012 5:30 am
by Pierluigi
Hello,

I didn't understand what the following sentence means:
"A static inner class can declare contain a non - static inner class."
I copy-pasted the whole sentence; it's the last one of the possible answers for q.6.2.189.
I think it's not very clear, but it could be just me not being a native English speaker.
Also read the explanation but it didn't give me a clue to the sentence.


P.S.: Funny thing is, during the test I stared at it for like 10 mins trying to get the meaning, then gave up and selected another answer... but the above sentence turned out to be the right one in the end :roll: so one more reason to ask!

Re: About Question com.enthuware.ets.scjp.v6.2.189 :

Posted: Tue Apr 03, 2012 7:47 am
by admin
I looks like "or" is missing or only one of the words declare and contain is required. Both convey the same meaning.
"A static inner class can declare or contain a non - static inner class."
"A static inner class can contain a non - static inner class."

It is a correct statement. Should be fixed asap.

thank you for your feedback!

Re: About Question com.enthuware.ets.scjp.v6.2.189 :

Posted: Sun Apr 08, 2012 6:04 am
by Pierluigi
Thank you for clarifying !

Just to understand better: back in the sentence
"A static inner class can declare or contain a non - static inner class.",
did you use "declare" and "contain" to just enforce the concept, or is there actually a difference between an inner class that's just contained, and one that is also declared inside the outer class? Isn't an inner class contained necessarily declared ? Although anonymous classes lack someway a declaration, they are instantly declared-and-initialized, so I guess even that kind of classes count in the group.
I'm afraid these nuances could choke me at the real exam, sorry for being pedantic here ;)

Re: About Question com.enthuware.ets.scjp.v6.2.189 :

Posted: Sun Apr 08, 2012 11:52 am
by admin
There is no special meaning to contain here. Declaring inside a class is same as contained in a class.

HTH,
Paul.