Skip to content

Instantly share code, notes, and snippets.

@aeg
Created February 19, 2013 01:38
Show Gist options
  • Save aeg/4982367 to your computer and use it in GitHub Desktop.
Save aeg/4982367 to your computer and use it in GitHub Desktop.
マップに要素を追加する。
// Case #1
// マップに要素を追加する
def map1 = [:]
map1.put('犬1', 'taro')
map1.put('猫1', 'tama')
map1['犬2'] = 'jiro'
println map1
// 実行結果
// [犬1:taro, 猫1:tama, 犬2:jiro]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment