• Post Reply Bookmark Topic Watch Topic
  • New Topic

About Enum  RSS feed

 
srinivas nageli
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Enum is a abstract class,but this class don't have any abstract methods then why they mentioned abstract.Please help me.
 
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
Because you're never supposed to create an instance of it directly, only of its subclasses (which are created automatically by the Java compiled when you use the "enum" keyword.) An abstract class acts the same whether it has any abstract methods or not.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!