How-to articles, tricks, and solutions about JAVA
Returning Arrays in Java
To return an array in Java, you can simply specify the array type as the return type of the method.
Can I add jars to Maven 2 build classpath without installing them?
Yes, you can add jars to the Maven build classpath without installing them.
Does java.util.List.isEmpty() check if the list itself is null?
No, the isEmpty() method of the java.util.List interface does not check if the list itself is null.
accessing a variable from another class
To access a variable from another class in Java, you can use the following steps:
Reading Properties file in Java
To read a properties file in Java, you can use the Properties class from the java.util package.
Parsing JSON string in Java
To parse a JSON string in Java, you can use the JSONObject class from the org.json package.