首页 > 解决方案 > startsWith 方法在 Eclipse 中显示下划线

问题描述

List days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]

List weekend =  days.findAll { it.startsWith('S')}
println days
println weekend

其中,startswith方法在eclipse中显示下划线。

有谁知道发生了什么?

标签: eclipsegroovy

解决方案


尝试使用双引号:it.startsWith( "S" )


推荐阅读