This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K & B doubt  (SCJP 1.5) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "K & B doubt  (SCJP 1.5)" Watch "K & B doubt  (SCJP 1.5)" New topic
Author

K & B doubt (SCJP 1.5)

Bharat Makwana
Ranch Hand

Joined: May 21, 2007
Posts: 107
Hello EveryOne,

Chapter 2, Question 1, page : 158.

The Question is that "Which of the following are true ?"(Questions is about has-a relationship) and the answer given is

B. Has-a relationship always rely on instance variables.

I think we can also use static variables for has-a relationship.

(Actually, in Kathy's bonus examination,there was one question about has-a relationship and one of the options of that question was "has-a relation always rely on instance variables". But in examination's answer book she has given explanation that "you can also use static variables in has-relationship")

So there is contradiction between these two answer. If anyone has more information on this please,inform me. I have also seen Errata given by Bert Bates, but this is not reported in that.

Thanks
[ June 21, 2007: Message edited by: Bharat Makwana ]

ॐ सर्वे जना: सुखिनो भवन्तु , तथास्तु |
'May the whole world be happy, so be it'

SCJP1.5, SCWCD1.5
Bharat Makwana
Ranch Hand

Joined: May 21, 2007
Posts: 107
Has anyone noticed it. Please tell me.
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Use search facility of Ranch. There has been discussion over this topic
hundreds of times.



Thanks,


cmbhatt
Bharat Makwana
Ranch Hand

Joined: May 21, 2007
Posts: 107
Well Chandra

I have searched and in no there any clear explanation.

And it's also not mentioned in Errata

Thank You
[ June 21, 2007: Message edited by: Bharat Makwana ]
Sasha Ruehmkorf
Ranch Hand

Joined: Mar 29, 2007
Posts: 115
Hi Bharat.

You could find discussion about this topic here:
http://www.coderanch.com/t/263314/java-programmer-SCJP/certification/HAS-Relationship
or here:
http://www.coderanch.com/t/262463/java-programmer-SCJP/certification/Clarification-Sefl-test-book
or here:
http://www.coderanch.com/t/258840/java-programmer-SCJP/certification/Has-relationship
or here:
http://www.coderanch.com/t/253284/java-programmer-SCJP/certification/has-static-variables

But I am sorry, you won't find a definitive answer to your question there. Maybe because there is none as there is no clear definition of the term has-a-relationship? I would suggest to forget about this question for the moment. In the exam you will be faced with questions that have definitive answers!
[ June 22, 2007: Message edited by: Sasha Ruehmkorf ]
Bharat Makwana
Ranch Hand

Joined: May 21, 2007
Posts: 107
Thank you Sasha,

Because of following I have posted this Question

(Actually, in Kathy's bonus examination,there was one question about has-a relationship and one of the options of that question was "has-a relation always rely on instance variables". But in examination's answer book she has given explanation that "you can also use static variables in has-relationship")

Anyway thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: K & B doubt (SCJP 1.5)
 
Similar Threads
K&B question
has-a relationship
HAS-A
has-a and static variables
Has-a relationship