Optimization Code (OCA JAVA SE 7 - Programmer I - Study Guide )

Hi everyone.
I would like know, in your opinion, what is "optimization code".
In my opinion, to optimize a code means make a code with the "Best practices" as possible to do this code become more readable and MAYBE a faster program.
I make this question because in the book OCA JAVA SE 7 - Programmer I - Study Guide - Exam 1Z0-803 do Robert Liguori e Edward Finegan has a question that say:
Polymorphism helps to facilitate which of the following? (Choose all that apply.)

The A is one of the answer that I marked, but the book say this answer is wrong and the explanation say:
"A" is incorrect because polymorphism has no effect on the level of optimization of the code.
In my opinion the polymorphism optimize the code and MAYBE not optimize the program.

what is the answer given to this question and the reason please ?
According to me the answer is C. Code obfuscation.Please correct me If im wrong.

When The Going Gets Tougher,The Tougher gets Going

Devaney Marcondes
Greenhorn

Joined: Nov 22, 2012
Posts: 22

posted Mar 07, 2013 10:26:18

0

Deepak Lal wrote:what is the answer given to this question and the reason please ?
According to me the answer is C. Code obfuscation.Please correct me If im wrong.

Answer: Book answer is B and D. Polymorphism aids in creating reusable code, because it allows the code to be written more abstractly, thus B is correct. Similar to B, polymorphism allows the code to be generic by using generic data types that any more specific object can fulfill. Thus, D is also correct.
"A" and "C" are incorrect. A is incorrect because polymorphism has no effect on the level of optimization of the code. C is incorrect because obfuscated code (code that is intentionally difficult to read) is not related to polymorphism.

In my opinion, "A" is correct to. I don't agree with you that the answer "C" is correct.