Java String startsWith example

String’s startsWith method checks if String starts with specific prefix. It returns boolean datatype.

Method Signature:

String startsWith Example:

When you run above program, you will get below output:

Please note that startsWith method is case sensitive as you can see in above example

Add Comment