开发者

Groovy - Strings with "$"

Is 开发者_运维知识库there any way to by pass "$" keyword at runtime eg println $anish

output will be $anish


Either use single quoted strings:

println '$anish'

Or escape the dollar as Tom suggests

println "\$anish"


with a backslash println \$anish

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜