Hii vishnu,
              Can i have some code for a singleton class.. i hope this would
enable me understand the concept better.. thanks for ur reply
sudhakar



>From: Vishnu Akkaraju <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: offtopic: Can i have only one object for a class
>Date: Wed, 11 Oct 2000 13:13:46 -0400
>
>Hi Sanjay,
>it is called singleton design pattern in OO paradigms.
>you can have a static method(like getInstance())
>which would check for the existence of instance,
>returns it if it exists or creates and returns if
>one does not exist.
>hope this helps you,
>vishnu.
>
>-----Original Message-----
>From: Sanjay Vashisht [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, October 10, 2000 12:42 AM
>To: [EMAIL PROTECTED]
>Subject: offtopic: Can i have only one object for a class
>
>
>Hi All
>
>This is an off-topic but an interesting question?
>can i have only one object for a class defined. If user try to create
>one more object that should be an Exception or error condition.
>
>Thanks in Advance.
>  Rgds
>Sanjay
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to