日期:2014-05-20  浏览次数:20579 次

这个endWith运用为什么不成功?
如题

public class Test
{
public static void main(String[] args)
{
 String greeting = "abcd";
boolean x = greeting.endWith("cd");
 System.out.println(x);
}
}


出现这样的结果

------解决方案--------------------
endWith 少了个s 应为endsWith