java4all@1986 java. Powered by Blogger.

What is meant by enum?

>> Thursday, May 26, 2011

Enum:It is defined as group of named constants.

  •    A enum is a class ,it should be used to extend java.lang.Enum but not other classes.
  • If we are taking only constants it is not necessary to put semicolons; at end of constants.
  • It also contains constructors, methods.
  • All constants  are public static and final.
  • Enum is a child class of java.lang.Enum
  • So enum cannot extend another class.
  • Enu can implement any n.o of interfaces.
  • We can declare enum ,inside and outside of a class,but not inside the method.
  • In enum constants are compulsary

0 comments:

Post a Comment

FaceBook Login

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

Total Pageviews

STATCOUNTER

  © Blogger template Simple n' Sweet by Ourblogtemplates.com 2009

Back to TOP