Joshua Bloch's Effective Java - 2nd Edition - will teach good ways to write Java Code and that will teach you a lot on writing performant code as well
J2EE - Pro JEE 5 Performance and Optimization by - Steve Haines - is a very good book
I would suggest focusing on bigger design and implementation issue first before looking into detail code optimization. After dealing with a lot of performance analysis assignments for clients, I had summarized the most common performance problem I found in this this article Top J2EE Performance Problems. Hope this may help.
subject: Java/ J2EE , JVM performance optimization and performance tuning