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