Infolinks In Text Ads

Jun 29, 2010

What is the use of startsWith and endsWith method in String java example

// What is the use of startsWith and endsWith method in String java example

public class Test {
        public static void main(String[] args) {       
            String st = new String("test string test here");
           
            System.out.println(st.startsWith("test"));
            System.out.println(st.startsWith("test", 12));
           
            System.out.println(st.endsWith("here"));
           
        }
}

1 comment:

LinkWithin

Related Posts Plugin for WordPress, Blogger...