This is my first groovy class whose file named "First.groovy" 

package mars.start

/** *//**
* 2008年5月1日0:12:40
*/
class First ...{
static void main(args) ...{
def date = new Date()
def cinwaer="Eric Han"
println """
Hello Everybody!
May you have a fun festival.
--$cinwaer!
--$date
"""
testDef()
}

static def testDef()...{
def i=51
int j=51

if(i == j)...{ 
for (n in 1..<9) ...{
println "cinwaer"+n;
}
}
}
}
本文介绍了一个简单的Groovy编程入门示例,展示了如何定义变量、使用日期类以及进行基本的循环操作。通过这个例子,读者可以了解到Groovy语法的一些基本特性。

1460

被折叠的 条评论
为什么被折叠?



