更新时间:2023-12-05 15:05:16
in groovy脚本你可以声明和访问它的静态方法,如下所示:
in groovy script you can declare and access static methods of it like this:
class A{
static void greet(String name){
println "hello $name!"
}
}
//code without class declaration will be executed as part of script.run() method
A.greet("world")