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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
Pierluigi
Posts: 8
Joined: Thu Feb 23, 2012 5:33 am
Contact:

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

Post 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!

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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!
If you like our products and services, please help us by posting your review here.

Pierluigi
Posts: 8
Joined: Thu Feb 23, 2012 5:33 am
Contact:

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

Post 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 ;)

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

There is no special meaning to contain here. Declaring inside a class is same as contained in a class.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests