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