Welcome to this Blog. I am Software Engineer and work for Zühlke Engineering AG in Bern. This is my private blog, in which I will post mainly about technical stuff like Software Engineering or IT related topics. The views expressed herein do not necessarily represent those of my employer.

 

 
 

 

Today I stumbled upon a nice solution, to use the Collections.EMPTY_LIST with Generics. Just use the method emptyList with Generics instead of the constant value.

For example:

Collections.<String> emtpyList();

 

 

 

 

 
  1. Well, I learned something today :-)

    Comment by Frank — 31.7.2008 @ 17:54

  2. And thank you!

    Comment by Hola — 13.11.2008 @ 22:51

  3. Useful snippet, thanks!

    Comment by Andy — 6.5.2010 @ 15:56

Leave a comment