groovy>> data = ["bill": "gates", "steve": "jobs", "aura": "kasih"]
If you want to add an element to the map, use:
groovy>> data["lady"] = "gaga"
orgroovy>> data.lady = "gaga"
To access an element of the map, use:
groovy>> println data["lady"]
or
groovy>> println data.lady
To get the size of the data, type:
groovy>> data.size()
To create an empty map, type:
groovy>> data = [:]
No comments:
Post a Comment