[Training Video - 6] [File Reading] Using log object in the Groovy class

Car c= new Car(log);
c.print()

class Car{
	def log
	public Car(log){
		this.log=log
	}
	public void print(){
		log.info "hello world"
	}
}

 

posted on 2015-06-17 11:11  张缤分  阅读(183)  评论(0编辑  收藏  举报

导航