• Post Reply Bookmark Topic Watch Topic
  • New Topic

Enum  RSS feed

 
duhit Choudhary
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why we use enums or in what condition we make enums???
plzz give any example along with the answer....thanks in advance....
 
dennis deems
Ranch Hand
Posts: 808
 
duhit Choudhary
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fine till now...... but what about having the abstract method in an enum???
and again how this method can perform differently for different constants???
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abstract method has to be implemented by every and each enum constant; these implementations may perform different things, of course.

Some time ago I've posted an example which contained abstract method in enums. Maybe it could help you too.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!