Utility class in Spring application – should I use static methods or not?

I don’t think so. A DateUtils class sounds like a pure utility class that doesn’t have any side effects but just processes input parameters. That kind of functionality may as well remain in a static method. I don’t think it’s very likely that you’ll want to mock date helper methods.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)