class Greet { def name Greet(who) { name = who[0].toUpperCase() + who[1..-1] } def salute() { println "Hello !" } } g = new Greet('world') // create object g.salute()
出现故障,请使用这个点击这里
输入:

浏览器支持

The desktop versions of the following browsers, in standards mode (HTML5 <!doctype html> recommended) are supported:

Firefoxversion 4 and up
Chromeany version
Safariversion 5.2 and up
Internet Explorerversion 8 and up
Operaversion 9 and up