在“Groovy and Grails recipes”一书中,我使用了以下代码片段:
String HelloLanguage = "def hello(language) {return \"Hello $language\"}"
最佳答案
我对 Groovy 不太熟悉我刚刚在 GroovyConsole 中尝试了你的字符串,但我得到了一个异常 - 在转义美元之后,它运行良好。难道是它?String HelloLanguage = "def hello(language) {return \"Hello \$language\"}"
https://stackoverflow.com/questions/2536721/
相关文章:
iphone - 我的Xcode-编译错误只是显示红色的感叹号
visual-studio - 在 Release模式下执行构建/重建解决方案时,VS2003错误
compiler-errors - TestNG对我来说很好用,但对其他工程师抛出com.googl
actionscript-3 - Flash ActionScript 文件突然无法编译?
iphone - 找不到库-命令/Developer/Platforms/iPhoneSimulat
c# - 在VS 2008解决方案中添加了项目;建立依赖性获取编译器错误CS0246