package com.zee.gradle.groovy01

//class HelloGroovy {
//
//
//    static void main(String[] args) {
//        for (int i = 0; i < 3; i++) {
//            System.out.print("ha ")
//        }
//        System.out.print("hello Groovy!")
//    }
//
//    // var
//    def test() {
//        "hello Groovy!"
//    }
//
//}


//3.times {
//    //print "ha "
//    print it
//}
//print "hello Groovy!"

//Closure c = {
//
//}

//0.step(10,2,{it->
//    println it
//})

// 安全导航操作符
//def foo(str) {
//    str?.reverse()
//}
//
//println foo("eez")
//println foo(null)

// 异常处理
//def sleep(){
//    Thread.sleep(1000)
//}


//class A {
//    static A test1() {
//        this
//    }
//
//    static A test2() {
//        this
//    }
//}
//
//A.test1().test2()


