aspose file tools
The moose likes Java in General and the fly likes Did you know enum is reserve keyword in J2SE 1.5? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Did you know enum is reserve keyword in J2SE 1.5?" Watch "Did you know enum is reserve keyword in J2SE 1.5?" New topic
Author

Did you know enum is reserve keyword in J2SE 1.5?

Surendra Kashyap
Greenhorn

Joined: Jan 22, 2002
Posts: 6
Traditionally, I have normally used 'enum' as variable for Enumeration declaration in my classes. However, I discovered that 'enum' is a reserved keyword in J2SE 1.5 that means, need to re-factor the code.

I thought, this is useful information which might be useful when code is migrated to 1.5 environment.

Regards,

Surendra


-Surendra Kashyap<br />SCJP, SCJD, SCWCD, SCBCD and MCSE
Tony William
Ranch Hand

Joined: Jun 27, 2005
Posts: 54
For me, I will usually use the common words as a prefix for my variables. In other words, I may have enumFruits, enumMyVar.


MCP, MCP+I, MCSE(NT4), MCSE+I, MCSE(2000), MCDBA, MCSD(VS6)<br />SCJP 5.0, SCBCD 1.3<br />ICED(v5.0), ICSD (WSP5.0)
Surendra Kashyap
Greenhorn

Joined: Jan 22, 2002
Posts: 6
That is a good idea!

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Did you know enum is reserve keyword in J2SE 1.5?
 
Similar Threads
Bit of Theory regarding Interfaces
Tomcat : error on token "enum" ?
Can we use Enum as a variable name in jdk1.4
r they keywords or literals?
Is there anything developed in java 4 and not run in java 5?