Don’t Be Afraid of Procedural Java
Consider this simple parsing class:
A typical usage might be:
Since the instance is only used to call a single method and then discarded, we can rewrite as:
Since the class doesn't implement any interfaces and is unlikely to be subclassed - it's a utility class - it's pretty clear that there's no need for the class to maintain state, and that there's no need to be instantiable. The method(s) should be static:
Now this doesn't feel like OO programming, and that's fine. Object-oriented code is very appropriate for many tasks but sometimes you just need to call a global method.






