Online Java Compiler By
JavaTpoint.com
public class EndsWithExample{ public static void main(String args[]){ String s1="java by javatpoint"; System.out.println(s1.endsWith("t")); System.out.println(s1.endsWith("point")); }}
Output