Question: Similar to [this question](https://stackoverflow.com/questions/233030/worst-php-practice-found-in-your-experience)...

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)

Answer: 
Our intern used `static` modifier to store currently logged user in Seam application.

```
 class Identity{
    ...
    public static User user; 
    ...
 }

 class foo{

    void bar(){
       someEntity.setCreator(Identity.user); 
    }

 }

```

Of course it worked when he tested it :)
In File I/O: incorrect use of try-catch block.

```
try {
   /* open file */
}
catch(Exception e) {
  e.printStackTrace();
}

try {
   /* read file content */
}
catch (Exception e) {
  e.printStackTrace();
}

try {
   /* close the file */
}
catch (Exception e) {
  e.printStackTrace();
}

```