Had an interesting discussion today in which a few points on Java came up. My primary focus has never been Java exclusively, so I am far from an expert, but I have been working with Java more extensively in the last few years with the Hadoop stack.
Explore the
variety of Map implementations. I usually reach for HashMap when sometimes I should be thinking about the other Map types. Lots of other goodies to review there, when doing development with a 'get a project done' focus it's easy to forget these basics, there's a bunch of other interesting Java collections topics in the sidebar there too.
There are
different reference types in Java which affect garbage collection. Many Java implementations make heavy use of object and object factories, let garbage collection throw away some of the extra stuff you may not need in your implementation.
In the fun with threads category, the
volatile keyword. As the author at the link succinctly puts "poorly documented, poorly understood, and rarely used." Avoid reliance on a changing global variable when using threads, use immutable types. Related to this is Java's
Atomic classes, another construct to allow simultaneous access among threads to common values. These can provide efficiency gains in advanced use cases, but in general really think, read about, and consider safer alternative patterns before using.