Groovy
文章平均质量分 51
Anvien
关注我的头条主页 http://www.toutiao.com/m50320225521/
展开
-
【Groovy手札】Groovy的几种注释
1.注释 1.1 单行注释在Groovy中,单行注释以// 开始,可以从一行的任意位置开始,// 后面的字符均为注解部分。例如:// a standalone single line commentprintln "hello world"// a comment till the end ofthe line 1.2 多行注释多行原创 2016-01-22 18:16:08 · 5061 阅读 · 0 评论 -
【Groovy手札】Groovy的字符串
Groovy提供不同的字符串表现形式,包括:def map= [:]map.'单引号'map."双引号"map.'''三重单引号'''map."""三重双引号"""map./单斜杠字符串/map.$/美元单斜杠字符串/$ Groovy同样支持Java的字符串类型(java.lang.String),而且也有自己的可插值字符串(groovy.lang.原创 2016-01-22 20:26:58 · 1342 阅读 · 0 评论 -
【Groovy手札】Groovy的List
Groovy采用逗号分隔一个列表(List)中的值,并且会转译成JDK中的java.util.List,并且Groovy的默认具体实现为java.util.ArrayList ,但是我们可以手动的转为其他实现。 def numbers = [1,2,3] (1)assert numbers instanceofLi原创 2016-01-24 10:14:32 · 706 阅读 · 0 评论