hi sanjay,
may be it's interesting...
it's that simple that just you put a static counter in class def.
so when it's going for second object , you can create an
exception.
by the way may i know what's the use of this single-object class.
cheers
janardhan
----- Original Message -----
From: Sanjay Vashisht <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 10, 2000 10:12 AM
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, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html