File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes justify answer object reuse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "justify answer object reuse" Watch "justify answer object reuse" New topic

justify answer object reuse

venkat lakkakula

Joined: May 03, 2007
Posts: 2
question: 1.which are following support object reuse?
1.class inheritance
2.object composition beans
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1710
I would go with JavaBeans. "Reusable components JavaBeans"


John Stone
Ranch Hand

Joined: May 04, 2007
Posts: 332
1, inheritance - you are reusing something already written and adding/overiding new stuff
2, this is just using old stuff, so I see no reuse here
3, do not know, but looks like using only components already written
4, nonsense

- question says object reuse, so I'm not sure now. I was thinking more about class reuse.
Matt Russell
Ranch Hand

Joined: Aug 15, 2006
Posts: 165
It's not clear what is intended by the term "object reuse". I'm guessing it means reuse of implementation, so this is my take given that assumption:

Inheritance and composition are the two big mechanisms for reusing functionality in an object-oriented language. In addition, the idea of JavaBeans, as Chandra points out, is to create reusable software components. Without qualification, the fourth option, "attributes", doesn't make much sense.

Inquisition: open-source mock exam simulator for SCJP and SCWCD
I agree. Here's the link:
subject: justify answer object reuse
It's not a secret anymore!