Java String equals example

Previous
Next

String’s equals method compares String with specified object. It checks if both have same character sequence. It is generally used to compare two Strings.

Method Signature:

String equals Example:

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

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