how to find a string within a string

Find a String within a String:
Search a String “a Nice” is Exist or Not within a String “Have a Nice Day” in JAVA

Coding:

String s = “Have a Nice Day”;
if(s.indexOf(“a Nice”)!=-1)
System.out.println(“string exist==>”);
else
System.out.println(“string Not exist==>”);

Popularity: 1% [?]

You can leave a response, or trackback from your own site.

Leave a Reply

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars