Keeping Util class methods static is a good practice or instance methods are good?
Keeping Util class methods static is a good practice or instance methods are good?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If a method is an utility method then it has no meaning in being associated to an instance of an object so there is no reason to make it an instance method.
An instance method should be something that is meaningful to a specific instance of a specific class.