File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes where is method :) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "where is method :)" Watch "where is method :)" New topic

where is method :)

Dan Polak
Ranch Hand

Joined: Nov 06, 2006
Posts: 32
Maybe someone know where is definition of static method values() whitch is available for every enums instance ?

enum A {


A[] a = A.values();

<a href="" target="_blank" rel="nofollow"></a>
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
It's in the language specification: JLS 8.9.

"I'm not back." - Bill Harding, Twister
Franz Fountain
Ranch Hand

Joined: Nov 15, 2006
Posts: 58
You can also take a look at this article on the Sun website regarding Enums:
It is sorta covered in the JavaRanch Style Guide.
subject: where is method :)
It's not a secret anymore!