class ContainsExample
{
public static void main(String args[])
{
String name="What do you know about GGI Khanna";//Initial String
//Following are the strings we are searching in above declared string
System.out.println(name.contains("do you know"));
System.out.println(name.contains("about"));
System.out.println(name.contains("Khanna"));
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.