[JAVA] Destroy object itself
Hello
i must simulate a web application by java program.
In main i call login form. This must create a Session object associated with user. The costructor of Session object must checks in database if username exist. If username exist it initializes other Session object variables, otherwise it must destroy itself, because the session can't be created.
In login form, before use Session object, i use "instanceof" to check if Session object exist, but how i can destroy Session object itself?
If you have another similar idea, post it please.
Bye.

