Created
February 19, 2013 01:38
-
-
Save aeg/4982367 to your computer and use it in GitHub Desktop.
マップに要素を追加する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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