jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes Trying to learn enumerated types of class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Trying to learn enumerated types of class" Watch "Trying to learn enumerated types of class" New topic
Author

Trying to learn enumerated types of class

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 688

i m trying to learn enumerated types of class , but when i was compiling it produced an error , i cant solve this please tell me whats wrong





The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

It should be public class TestProgram. That solves all but one compiler error.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 688

Rob Spoor wrote:It should be public class TestProgram. That solves all but one compiler error.

what is the actual use of doing this , i mean we can do this without enum also , so why we need enum ???
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

When you create a type, that type must be an interface, a class or an enum. You must specify which of the three; the enum keyword simply replaces the class keyword in the type declaration.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trying to learn enumerated types of class
 
Similar Threads
Compare an Object to an Enum list
Overriding equals() method within a subclass
enums
Arraylist insights
cannot read a Collection of a custom class as a parameter