An error in enthuware.ocajp.i.v8.2.1312

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
klhlubek
Posts: 7
Joined: Mon Oct 12, 2015 9:58 am
Contact:

An error in enthuware.ocajp.i.v8.2.1312

Post by klhlubek »

I found an error in the explanation of the question, which is actually pretty big. ;)
A valid method declaration MUST specify a return type, all other things are optional.
The underlined part is completely false, but as often as I do I see, why you have written that, but it is still not correct, because the identifier of a method is not optional like the parantheses after it or the curly braces, which are again after the parantheses, too.
So correct the mistake, please.

I hope I could help you,

Kamil

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

Re: An error in enthuware.ocajp.i.v8.2.1312

Post by admin »

I sincerely appreciate you taking time in reporting this, but I think you are taking the statements out of context. The statements in explanations are not meant as definitions. A definition has absolutely no extra word and every word is critical. But these are explanations. They are just trying to explain a point in an easy to understand manner. When you explain something, you focus on one point and ignore the rest. That is what an explanation is. Obviously, this will make the statements a bit imprecise. But that is ok. That is the reason people read books instead of specifications, which are supposed to contain 100% precise statements.

So yes, you could argue that "everything is optional" is wrong but I do not agree with that. Here, everything is optional doesn't imply that class is optional, it doesn't mean {} are optional, it doesn't mean () are optional. If you go through all the explanatory statements given with the question, it will be clear that the statement is talking about keywords and parameters. You said it yourself that you see what it implies.

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

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

Re: An error in enthuware.ocajp.i.v8.2.1312

Post by admin »

Oh, and by the way, here is the text that explains a valid method declartion in 100% precise fashion:
MethodDeclaration:
{MethodModifier} MethodHeader MethodBody
MethodHeader:
Result MethodDeclarator [Throws]
TypeParameters {Annotation} Result MethodDeclarator [Throws]
MethodDeclarator:
Identifier ( [FormalParameterList] ) [Dims]
Source: https://docs.oracle.com/javase/specs/jl ... ml#jls-8.4
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 243 guests