Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

K & B doubt (SCJP 1.5)

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Bharat Makwana
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone noticed it. Please tell me.
 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use search facility of Ranch. There has been discussion over this topic
hundreds of times.



Thanks,
 
Bharat Makwana
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bharat.

You could find discussion about this topic here:
https://coderanch.com/t/263314/java-programmer-SCJP/certification/HAS-Relationship
or here:
https://coderanch.com/t/262463/java-programmer-SCJP/certification/Clarification-Sefl-test-book
or here:
https://coderanch.com/t/258840/java-programmer-SCJP/certification/Has-relationship
or here:
https://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
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic