Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

plz explain oveloading of constructor in enum with example

 
kapilg gupta
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
plz explain withthe code and flow how constructor overloading is implemented in enum please give complete details of the flow of code
 
Campbell Ritchie
Sheriff
Pie
Posts: 48981
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is is sensible to overload the constructor in an enum?
It doesn't sound a good idea at all.
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kapilg gupta:
plz explain withthe code and flow how constructor overloading is implemented in enum please give complete details of the flow of code


Please show us an attempt to do your own work first.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48981
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
attempt to do your own work first
I tried it myself and did manage to come up with an overloaded constructor, but it was obviously a totally daft way to set up an enum.
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Campbell Ritchie:
I tried it myself and did manage to come up with an overloaded constructor, but it was obviously a totally daft way to set up an enum.


Obviously. I just loathe when someone posts "plz explain this with details" without bothering to show us that they've actually attempted to do it themselves or providing any context. It just screams "plz do my work for me without any effort on my part" which I'm not particularly fond of. If they had posted their own attempt or mentioned what led them to this and why they're asking then that might be enough.
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duplicate Post

I already gave reply of your question at here

please explain the code and please anyone give example of overloading in enum

If you have any query please post in the same thread.


Naseem
 
kapilg gupta
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ken Blair:


Obviously. I just loathe when someone posts "plz explain this with details" without bothering to show us that they've actually attempted to do it themselves or providing any context. It just screams "plz do my work for me without any effort on my part" which I'm not particularly fond of. If they had posted their own attempt or mentioned what led them to this and why they're asking then that might be enough.


i dont want anyone do my work i have written twice before the code of enum in my previous question and i have no problems writing it again but when i did it earlier i got a reply of duplicate post
 
Marilyn de Queiroz
Sheriff
Posts: 9064
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you provide a link to the thread where your code is.
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kapilg gupta:


i dont want anyone do my work i have written twice before the code of enum in my previous question and i have no problems writing it again but when i did it earlier i got a reply of duplicate post


Then shouldn't you be continuing this discussion in the thread where you asked the first time?
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyway I am posting it again...

Following code overloads constructor as well as method.



Regards

Naseem
[ June 20, 2006: Message edited by: Naseem Khan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic