Java Class Popularity

Posted by Mike Haller on Friday, April 17. 2009 at 08:00 in Java
Taken from a heap dump of a JBoss Application Server with some applications deployed, i've look at the number of objects in the heap and compiled a 'popularity list' accordingly:

java.util
1. ArrayList
2. HashMap
3. TreeMap
4. Vector
5. Hashtable
6. LinkedList
7. HashSet
8. WeakHashMap
9. TreeSet

Read on to see the full list. I've marked some classes which I find interesting enough to have a second look on them. Know your library.

10. LinkedHashMap
11. Properties
12. Stack - Use Dequeue instead
13. BitSet
14. LinkedHashSet
15. EnumMap
16. IdentityHashMap

java.lang
1. String
2. Long
3. Class
4. Double
5. Integer
6. Byte
7. Short
8. StringBuffer
9. ThreadLocal
10. Character
11. Float

java.lang.ref
1. SoftReference - Use for caches.
2. WeakReference
3. ReferenceQueue
4. FinalReference
5. PhantomReference

java.lang.reflect
1. Method
2. Constructor
3. Field
4. Type

java.util.concurrent
1. ConcurrentHashMap
2. TimeUnit
3. LinkedBlockingQueue
4. ThreadPoolExecutor
5. CopyOnWriteArrayList - Warning!

java.util.concurrent.atomic
1. AtomicLong - For sequence counters
2. AtomicInteger
3. AtomicBoolean

java.util.concurrent.locks
1. ReentrantLock - Yeah, with getHoldCount()

java.math
1. BigDecimal
2. BigInteger
3. RoundingMode
4. MutableBigInteger (Not public API)
5. SignedMutableBigInteger (Not public API)

java.nio
1. DirectByteBuffer
2. HeapByteBuffer


Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications
 
Submitted comments will be subject to moderation before being displayed.
 

About

My name is Mike Haller and I'm a software developer and architect at Bosch Software Innovations in Germany. I love programming, playing games and reading books. I like good food, making photos and learning and mentoring about the craftsmanship of commercial software development. Stack Overflow profile for mhaller

Quicksearch