(String).endsWith [1]
public boolean endsWith(String suffix)

指定文字列で終わるか調べます。equals メソッドが使われています。

if (input.endsWith("ho")) {
    System.out.println("It ends with 'ho' .");
}