Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exam Quidebook

 
Bratt Locke
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is available at Sun' web site.
 
Luna Bora
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The link to this success guide is http://suned.sun.com/US/certification/guide/index.html
Sun has provided some sample questions in this success guide. I have a doubt regarding one question.
What are two benefits of Singleton Pattern?(choose two)
The answer to this is
b. It controls access to a single instance.
c. It permits a variable number of instances.
I did not understand what the 'c' option is. Can anyone explain this option?
Thanks in advance.
 
David Rocks
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luna,
If by variable then they mean 0 or 1 then i suppose that it is correct.
Not a very nice question epecially under exam conditions to get so at least they give it in the sample questions.
David
 
joe kline
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luna,
I wondered the same thing at one point. It clearly indicates this in the Design Pattern book, under Singleton, under Consequences.
Basically, the idea is that once you've develop to rigor\framwork to limit instances to a single instance. It's easy to extend that to, for performance reasons let's say, allow as many as "5".
From GOF Design Patterns page 128
"Moreover, you can use the same approach to control the number of instances that the application can use. Only the operation that grants access to the Singleton instance needs to change".
Hope this helps
[This message has been edited by joe kline (edited July 25, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic