Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why Return type Enum?

 
namita sasa
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am confused about why return type of methods getAttributeNames() and getParameterNames() is enum? Why not string[]?
 
Vinay Nath
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Design choice, flexibilty etc. read enumeration advantages vs arrays.

example:

think about it, you want to perform some operation on all attributes/parametres except one and think about an array, how it creates hell of a problem...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic