aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes HAs-a Relationship Problem SCJPTEST Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "HAs-a Relationship Problem SCJPTEST" Watch "HAs-a Relationship Problem SCJPTEST" New topic
Author

HAs-a Relationship Problem SCJPTEST

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

scjptest.com
What is true about has-a and is-a relationships? (Choose two)
A) Instance variables can be used when creating a has-a relationship.
B) Inheritance represents an is-a relationship.
C) Inheritance represents a has-a relationship.
D) Instances must be used when creating a has-a relationship.
Answers: A, B

So,Instances are not required for Has -a relationship

can anyone give me a Example ?


OCPJP 6.0 93%
OCPJWCD 5.0 98%
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5



A Ship has an Oar which is null. Oar does not necessarily have an instance associated with it


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14114
    
  16

Where did you copy this question from? Please remember that you are required to QuoteYourSources on JavaRanch whenever you copy a question from a book, mock exam or other source.

What do you mean with "from SCJP TEST"? Is this from the real, actual exam? Are you aware that you are not allowed to copy the content of the real exam?

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
wood burning stoves
 
subject: HAs-a Relationship Problem SCJPTEST