• Post Reply Bookmark Topic Watch Topic
  • New Topic

enum in Java 1.4.2?  RSS feed

 
Subhash Sriram
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following code given to me by an instructor:



Everytime I try to compile it, I get an error saying it is expecting a class or interface.

The name of the file is Language.java and I am compiling using J2SDK 1.4.2_06 and I also tried 1.4.2_09.

Is there a reason I am getting this? Do I need to upgrade my SDK or something?

Thank you in advance.
 
Mark Van Tuyl
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enumerations have been around since JDK 1.0. Enums are new in JDK 1.5.0.

You might want to take a look at this page: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Enumeration.html
[ October 04, 2005: Message edited by: Mark Van Tuyl ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But more to the point: the code you've given is invalid in any version of Java; you should ask your instructor what s/he meant for you to do with it.
 
Subhash Sriram
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both very much for the info.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!