groovy switch判断
groovy switch判断
条件判断
//定义参数
def color = "red"
//switch判断
switch(color) {
case "red":
println("red")
break
case "blue":
println("blue")
break
//当匹配不到时
default:
println("No matching case found!!");
}
本文来自博客园,作者:liwenchao1995,转载请注明原文链接:https://www.cnblogs.com/liwenchao1995/p/16493758.html