aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Override constructor in a enum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Override constructor in a enum" Watch "Override constructor in a enum" New topic
Author

Override constructor in a enum

Elier Rguez
Greenhorn

Joined: Jun 27, 2013
Posts: 22
Hello,
I am curious about if there is any way to implement a new constructor for a particular item in a enum. Like it's possible to override a method.


Thanks in advance.

Jack McLaren
Greenhorn

Joined: Jun 17, 2013
Posts: 13

Elier Rguez wrote:Hello,
I am curious about if there is any way to implement a new constructor for a particular item in a enum. Like it's possible to override a method.


Thanks in advance.



Do you know that constructors can be overloaded but not overridden ?


I AM THE LAW.
Ben Pheonix
Ranch Hand

Joined: Dec 11, 2012
Posts: 46
    
    1

Hi,

Good answer. No there is no way you can provide a separate constructor for an enum element. Additionally constructors are overloaded
not overriden.

HTH,
Ben


Twitter:ben_pheonix
Elier Rguez
Greenhorn

Joined: Jun 27, 2013
Posts: 22
Thanks guys.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Override constructor in a enum