• Post Reply Bookmark Topic Watch Topic
  • New Topic

Get single instance method  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please help me with the getsingleInstance() method of an object? I was under the impresssion that the only way to create new instances of a class was by doing this:
Class_name instance_name = new Class_name();
if you are using the default constructor. If such a method exists, what does it do and how does it differ from the above example?
I will truly appreciate your help.
Thanks,
Richard
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Richard,
i do not find any such method in the api. could u please specify where u got this method.
IMO u r code has this method which returns a singleton object derived from u r code.
check out for singleton here
http://www.javaranch.com/ubb/Forum24/HTML/001277.html
Regds.
Rahul
[This message has been edited by rahul_mkar (edited July 28, 2000).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!