Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

comparing two enum types

 
Dounia Kchiere
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I would like to know if I can compare two enu types for compatibility based on the compareTo method in Enum Class or do I have to override it.


Thank you,

Dounia
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you mean by comparing enum types for compatability but the compareTo() method inherited by all enum types is final and can't be overridden.
 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that you can subclass an enumerated type, can you?

-- Kaydell
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic