Top 16 Java Utility Classes

In Java, a utility class is a class that defines a set of methods that perform common functions. This post shows the most frequently used Java utility classes and their most commonly used methods. Both the class list and their method list are ordered by popularity. The data is based on randomly selected 50,000 open source Java projects from GitHub.

Read more

Top 9 questions about Java Maps

In general, Map is a data structure consisting of a set of key-value pairs, and each key can only appears once in the map. This post summarizes Top 9 FAQ of how to use Java Map and its implemented classes. For sake of simplicity, I will use generics in examples. Therefore, I will just write Map instead of specific Map. But you can always assume that both the K and V are comparable, which means K extends Comparable and V extends Comparable.

Read more

Top 10 questions about Java Collections

The following are the most popular questions of Java collections asked and discussed on Stackoverflow. Before you look at those questions, it’s a good idea to see the class hierarchy diagram. 1. When to use LinkedList over ArrayList? ArrayList is essentially an array. Its elements can be accessed directly by index. But if the array … Read more

Top 10 Methods for Java Arrays

The following are top 10 methods for Java Array. They are the most voted questions from stackoverflow. 0. Declare an array String[] aArray = new String[5]; String[] bArray = {"a","b","c", "d", "e"}; String[] cArray = new String[]{"a","b","c","d","e"};String[] aArray = new String[5]; String[] bArray = {"a","b","c", "d", "e"}; String[] cArray = new String[]{"a","b","c","d","e"}; 1. Print an … Read more

Top 8 Tools for Natural Language Processing

English text is used almost everywhere. It would be the best if our system can understand and generate it automatically. However, understanding natural language is a complicated task. It is so complicated that a lot of researchers dedicated their whole life to do it. Nowadays, a lot of tools have been published to do natural … Read more

Frequently Used Methods of Java HashMap

HashMap is very useful when a counter is required.

HashMap<String, Integer> countMap = new HashMap<String, Integer>();
 
//.... a lot of a's like the following
if(countMap.keySet().contains(a)){
	countMap.put(a, countMap.get(a)+1);
}else{
	countMap.put(a, 1);
}

Read more

100 High-Quality Java Developers’ Blogs

The intent of this page is to collection the best 100 Java blogs and help programmers to find good blog posts to read. Some of these blogs may not be written by Java developers, but Java developers should find it useful or interesting. Reading those blogs should be fun and often bring some fresh ideas. … Read more

8 Things Programmers Can Do at Weekends

Weekends are an important time to unplug from the day-to-day job and get recharged. They are also a good chance to think more deeply about things. Software programmer (developer or engineer) is a special occupation comparing to others, even though many jobs require the use of computers. Inspired by “14 Things Successful People Do On … Read more