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

Map instance variable

 
Pawan Arora
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read the following line in head first book page no.185 in second paragraph:


You can think of attribute as simply a name/value pair (where the name is a String and the value is an Object) in a map instance variable.

But I really don't understand what they mean with map instance variable here? Could someone please tell me.

Thanks in advance.
 
Lee Kian Giap
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means the attribute is similar to the Map object in Collection, where it is storing a key/value pair (key : Object , value : Object).
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi,

In general Map is collection of objects...

Which contains <Object , Object> key/value pair...

As you know String is also an Object that is why they just give general scenario.

 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi,

In general Map is collection of objects... Which contains Key and Value pair..

Which contains <Object , Object> key/value pair...

As you know String is also an Object that is why they just give general scenario.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic