Arrays.sort(T, Comparator < ? super T > c) is a method for sorting user-defined object array. The official Java Doc briefly describe what it does, but not much for deep understanding. In this post, I will walk though the key information for deeper understanding of this method. Continue »
One of the most significant advantages of Java is its memory management. You simply create objects and Java Garbage Collector takes care of allocating and freeing memory. However, the situation is not as simple as that, because memory leaks frequently occur in Java applications.
Sometimes, Java standard library is not good at string manipulation. Google Guava is a library written by Google which provides some nice features. The following example shows how to use Google Guava Splitter’s Modifier methods.
How substring(int beginIndex, int endIndex) method works in JDK 6 and JDK 7 are different. This article use a diagram to illustrate their difference. Knowing the difference can help you avoid problems. Continue