数组转字符串

join用指定的字符连接collection中的element
 
def list = [2007, 8, 26]
list.join('-')
 
运行结果:
2007-8-26
 
def arr=['asd',2018,123] as String[]
 
print arr.sort().join('')
posted @ 2014-03-11 15:43  谈感情伤钱  阅读(131)  评论(0编辑  收藏  举报