Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

enum types may not be instantiated

843793Jan 1 2005 — edited Jan 4 2005
I have used Enum

I plan to store the value of Enums into Database and then retrieve it

On Retrieving I get the values in a java.sql.resultSet Object

I want to assign the value of the result to the Enum Variable

So I try to set through constructor
for eg
new Class1(new LogicalYesNo(rs.getInt(1));
But that throws an Exception saying
enum types may not be instantiated
So how to do that

Thanks in advance

CSJakharia
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2005
Added on Jan 1 2005
5 comments
2,068 views