Alok Kumar
Alok Kumar

Reputation: 63

Difference between StringUtils' method and String's method

Is there any difference between StringUtills.endWith("str","substr") and str.endWith("substr")?

Upvotes: 0

Views: 1093

Answers (1)

Jens
Jens

Reputation: 69460

StringUtils methods are null-safe.

So if str is null you do not get a nullpointerexception if you are using StringUtils.

For more informations see the documentation.

Upvotes: 3

Related Questions