text: The endsWith() method is used to check if a specified string ends with the specified suffix.
  Java Platform: Java SE 8
  Syntax :
  endsWith(String suffix)
  Parameters:
  Return Value :.
  Return Value Type: boolean
  Example : Java String endsWith() Method
  The following example shows the usage of java String() method.
  public class Example {); System.out.println(); // Display the results of the endsWith calls. System.out.println("\"" + str1 + "\" ends with " + "\"" + end_str + "\"? " + ends1); System.out.println("\"" + str2 + "\" ends with " + "\"" + end_str + "\"? " + ends2); System.out.println(); } }
  Output:
  "Python Exercises" ends with "se"? false "Python Exercise" ends with "se"? true
  Java Code Editor:
  Join our Question Answer community to learn and share your programming knowledge.