在Groovy中,可以使用以下兩種方式進行注釋:
// 這是單行注釋 def myVar = 10 // 另一個單行注釋
/* 這是 多行 注釋 */ def myVar = 10 /* 這也是 多行 注釋 */