JDK-4093668 : Why no enum support in Java?
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 1.1.4,1.1.5
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows_95,windows_nt
  • CPU: generic,x86
  • Submitted: 1997-11-18
  • Updated: 2014-09-26
  • Resolved: 2002-02-26
Related Reports
Duplicate :  
Description

Name: bk70084			Date: 11/18/97


A native enumeration type (i.e. the ability to
reference a named constant that you don't care 
what the value is - eg: RED,BLUE,GREEN) is very 
missing in the core language definition of Java.

Why isn't there one - and are there plans to add 
it?
(Review ID: 20067)
======================================================================

Comments
WORK AROUND Name: bk70084 Date: 11/18/97 final static constants (yech!) ======================================================================
11-06-2004

PUBLIC COMMENTS Request for enum support in Java language.
10-06-2004

EVALUATION There aren't any plans to add an enum type to the language. I am assigning this to Dave so he can comment further, if he'd like, or just close this. todd.turnidge@Eng 1997-11-18 Interfaces that define static final constants go a long way towards to functionality of enums; what they miss is the type-safety. Enums could in fact be useful to the extent that they improve readability and safety. At this time there are no plans to add enums to the language. Static final constants may be suboptimal, but they are a sufficiently workable solution for the moment; they aren't a big enough win to warrant changing the language at this point. david.stoutamire@Eng 1997-12-04 We'll be reviewing this issue for future releases. gilad.bracha@eng 2001-02-08
04-12-1997