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"));
           
        }
}

Popular posts from this blog

What is NBioBSP Java Library?

Draw arrow line example

Capture image from webcam java code, examples