I want to check a string which starts with http:// or not. How can I do that without loop? Thanks in advance.
http://
use public boolean startsWith(String prefix) in String API
public boolean startsWith(String prefix)
eg : boolean isStartsWith = YOUR_STRING.startsWith("http://");
boolean isStartsWith = YOUR_STRING.startsWith("http://");
String tst = "http://web.com"; System.out.print(tst.startsWith("http://")); //prints true