File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

from Enum

 
Nishant Arora
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class as
enum CheckEnum{ } i have compiled it.
then i disassembled it using javap command , i got

final class CheckEnum extends java.lang.Enum{
--------------------;
--------------------;
static{ };
}

Can anyone explain in detail why this static dispalyed here?
thanks.
 
Rob Spoor
Sheriff
Pie
Posts: 20381
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I decompiled that class using JAD, and this is the output:
I can match valueOf and values, so that static block probably matches the creation of the array.

As for the confirmation, I added one single enum value, and JAD now produces this:
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic