編集の要約なし |
編集の要約なし |
||
2行目: | 2行目: | ||
public boolean endsWith(String suffix) | public boolean endsWith(String suffix) | ||
指定文字列で終わるか真偽します。equals メソッドが使われています。 | |||
if (s1.endsWith("ho")) { | if (s1.endsWith("ho")) { | ||
System.out.println("true"); | System.out.println("true"); | ||
} | } |