Answer by Ashwin for Naming convention for utility classes in Java
Here is what I do:I consider utility classes to be a code smell, but sometimes they are required to reuse methods that do not fit in any other class.I prefer filename with Utils suffix as it includes...
View ArticleAnswer by ring bearer for Naming convention for utility classes in Java
There is no standard rule/convention in Java world for this. However, I prefer adding "s" at the end of Class name as @colinD has mentioned.That seems pretty standard to what Master java API Designer...
View ArticleAnswer by Jay for Naming convention for utility classes in Java
Like many such conventions, what's important is not so much what convention you use, as that you use it consistently. Like, if you have three utility classes and you call them CustomerUtil,...
View ArticleAnswer by ColinD for Naming convention for utility classes in Java
I like the convention of just adding "s" to the type name when the type is an interface or a class you don't control. Examples of that in the JDK include Collections and Executors. It's also the...
View ArticleAnswer by KSwift87 for Naming convention for utility classes in Java
I'm pretty sure the words "helpers" and "utilities" are used interchangeably. Anyway judging by the examples you provided, I'd say if your classname is an abbreviation (or has abbreviations in it like...
View ArticleAnswer by Aito for Naming convention for utility classes in Java
I think that 'utils' should be the package name. The class names should specify the purpose of the logic inside it. Adding the sufix -util(s) is redundant.
View ArticleNaming convention for utility classes in Java
When writing utility classes in Java, what are some good guidelines to follow?Should packges be "util" or "utils"? Is it ClassUtil or ClassUtils? When is a class a "Helper" or a "Utility"? Utility or...
View Article
More Pages to Explore .....