String Question 21

Home / Java Practice Question / String Question 21

String Question 21


WAP to Check if a string starts with a specific prefix.....

Program : 



public class StringPractise {

public static boolean findStartstr(String str , String prefix){

if(str.startsWith(prefix)){
return true;
}else{
return false;
}
}

}