I was poking through the Apache Commons java docs when I found this:
WordUtils instances should NOT be constructed in standard programming.
Why?
I am a novice programmer, so perhaps it’s the “standard” bit that is tripping me up…
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.
WordUtilsis a static utility class. It provides a bunch of static methods that each performs a useful task, but there is no need to ever create an instance of WordUtils, because the class stores no state.You can invoke static methods directly upon the class:
There is no need to create an instance:
Although this will work, creating the WordUtils object (using
new) is pointless.If all this
staticstuff makes no sense, try the Java Tutorial on the topic.