Java String endsWith example

Last updated on March 19th, 2017 at 12:29 pm

Previous
Next
String’s endWith method checks if String ends with specific suffix. It returns boolean datatype.

Method syntax:

String endsWith Example:

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

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

Previous
Next

Join Our News Letter - Stay Updated

Subscribe to Awesome Java Content.

Add Comment

Join Our News Letter - Stay Updated

Subscribe to Awesome Java Content.
You can like our facebook page Java2blog