Similar to this question…
What are the worst practices you actually found in Java code?
Mine are:
- using instance variables in servlets (it’s not just bad practice but bug, actually)
- using Collection implementations like HashMap, and not using the appropriate interfaces
- using seemingly cryptic class names like SmsMaker (SmsFactory) or CommEnvironment (CommunicationContext)
I had to maintain java code, where most of the Exception handling was like: