aspose file tools*
The moose likes Associate Certification (OCAJP 7/8) and the fly likes Optimization Code (OCA JAVA SE 7 - Programmer I - Study Guide ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Associate Certification (OCAJP 7/8)
Bookmark "Optimization Code (OCA JAVA SE 7 - Programmer I - Study Guide )" Watch "Optimization Code (OCA JAVA SE 7 - Programmer I - Study Guide )" New topic
Author

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

Devaney Marcondes
Greenhorn

Joined: Nov 22, 2012
Posts: 22
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.)

A. Highly optimized code
B. Code reuse
C. Code obfuscation
D. Code that is generic and flexible

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.
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Optimization Code (OCA JAVA SE 7 - Programmer I - Study Guide )