Or, alternatively, you should be able to get away with

Object o = null;
o.toString();  // this prints out the appropriate enum

This will only work if you have the special version of the Javac compiler
Sun released very quietly a few months ago--do a Web search for "enum" to
get the necessary link.

Ted Neward
{.NET || Java} Course Author & Instructor, DevelopMentor
(http://www.develop.com)
http://www.javageeks.com/tneward

----- Original Message -----
From: "Rickard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 5:04 AM
Subject: Re: [EJB-INT] Implement enum in Java


> Srikant Chonnad wrote:
>
> > Hi,
> >      I want to implement 'enum' (as in C++) in Java. Please help.
>
> The best way to do it is to use Thread.yield() to let the other thread
> do its job. You may want to use Thread.sleep() as well to be on the safe
> side.
>
> /Rickard
>
> --
> Rickard �berg
> Author of "Mastering RMI"
> Chief Architect, TheServerSide.com
>    The Middleware Company - We Build Experts!
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to