这个endWith运用为何不成功
这个endWith运用为什么不成功?
如题
出现这样的结果

------解决方案--------------------
endWith 少了个s 应为endsWith
如题
public class Test
{
public static void main(String[] args)
{
String greeting = "abcd";
boolean x = greeting.endWith("cd");
System.out.println(x);
}
}
出现这样的结果
------解决方案--------------------
endWith 少了个s 应为endsWith