Core Java
-
Code4ReferenceList Recently Used(LRU) implementation using LinkedHashMap
Recently I stumbled on one of the Java interview questions: “Implement List-Recently-Used (LRU) Cache using Java collection class?” If you…
Read More » -
Reactive Queue with Akka Reactive Streams
Reactive streams is a recently announced initiative to create a standard for asynchronous stream processing with built-in back-pressure, on the…
Read More » -
Writing Clean Tests – Divide and Conquer
A good unit test should fail for only one reason. This means that a proper unit test tests only one…
Read More » -
SynchronousQueue Example in Java – Producer Consumer Solution
SynchronousQueue is special kind of BlockingQueue in which each insert operation must wait for a corresponding remove operation by another…
Read More » -
Out of memory: Kill process or sacrifice child
It is 6 AM. I am awake summarizing the sequence of events leading to my way-too-early wake up call. As…
Read More » -
Beauty and strangeness of generics
Recently, I was preparing for my Oracle Certified Professional, Java SE 7 Programmer exam and I happened to encounter some rather…
Read More » -
Listing and filtering directory contents in NIO.2
There hasn’t been much happening in the area of listing directory contents until the release of Java 7. But since…
Read More » -
Java 8 Optional: How to Use it
Java 8 comes with a new Optional type, similar to what is available in other languages. This post will go…
Read More »