+91-85006-22255
Write a program to check the given input string is ends with given suffix or not.
class IsEndsWithGivenSuffix { public static void main(String s[]) { String inputString = "MeritCampus"; String suffix = "Campus"; System.out.println("The input string is ends with " + suffix + ": " + isEndsWithSuffix(inputString, suffix)); } public static boolean isEndsWithSuffix(String inputString, String suffix) {
} }
Topic: Java String startsWith() And endsWith() Methods
Read this topic Take test on this topic
Open In App