Thursday, November 25, 2010
Wednesday, November 24, 2010
When is a Singleton not a Singleton?
Yesterday happen to read this post, very nice one http://java.sun.com/developer/technicalArticles/Programming/singletons/
Wednesday, November 03, 2010
Use of static inner classes
We have HashMap.Entry class that is declared as a static inner class, I was searching for why it has been declared as static inner class and I found this post, which talks about when to use what type of inner classes.
In Short,
- Convenient way of grouping classes without using packages
- To create an instance of this class, we don't need outer class's object
- It will help you to extend from some other class
java.util.HashMap.Entry
- java.util.LinkedHashMap.Entry
- java.util.HashMap.EntrySet
- java.util.HashMap.HashIterator
- java.util.LinkedHashMap
Subscribe to:
Posts (Atom)