You are not allowed to use any inbuilt functions like indexOf()
, contains()
or matches() of String class.
Find string apple in string webapple using given char arrays?
String webapple ="webapple";
String apple="apple";
char[] webappleArray=webapple.toCharArray();
char[] appleArray = apple.toCharArray();
write a function
public boolean isPresent(char[] apple ,char[] webapple ){
//your code here
}