⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 foo.groovy

📁 大名鼎鼎的java动态脚本语言。已经通过了sun的认证
💻 GROOVY
字号:
import java.io.Serializable/**  * A dummy bean for testing the use of properties in Groovy *  * @author <a href="mailto:james@coredevelopers.net">James Strachan</a> * @version $Revision: 1.12 $ */class Foo implements Serializable {    // public properties    def name = "James"    def count    String location = "London"        // declare private variables    private blah = 9    private invisible = "invisible"    // declare a protected variable    protected prot = "hide me!"    // declare a bean with explicit typing    private String body    static void main(args) {        def f = new Foo()        println f    }        // provide a getter method    def getCount() {         if (count == null) {             count = 1         }         return count    }         def getBlah() {         return blah    }    public String getBody() {        return this.body    }    public void setBody(String body) {        this.body = body    }    String toString() {        return super.toString() + " name: ${name} location: ${location}"    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -