Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diff b/w [attributename]

 
sundar sankar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Iam unable to understand the difference between name["somevalue"] and name[somevalue].iam using hfsj.
Thanks in advance.
sankar
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The concept is similar to normal Java code.

If I were to call a method like this:
name.get(someValue)
you would expect someValue to be a variable. This variable could be anything. You have to take an extra step to resolve/figure out what someValue represents.

If, however, I wrote the code like this:
name.get("someValue")
you would expect "someValue" to be a literal String.
 
sundar sankar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marc Peabody ,
Thanks a lot.
Regards
sankar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic