Callable and Future in Java

public interface Callable<V> http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Callable.html A task that returns a result and may throw an exception. Implementors define a single method with no arguments called call. The Callable interface is similar to Runnable, in that both are designed for classes whose instances are…

Sanitize JSON using Java

Introduction Given JSON-like content, convert it to valid JSON! The OWASP JSON Sanitizer Project is a simple to use Java library that can be attached at either end of a data-pipeline to help satisfy Postel’s principle: be conservative in what you do,…

Usage of Joda Date Time API

This tutorial shows how we can use joda date time API. Java’s standard date and time classes (mainly java.util.Date and java.util.Calendar) have limited functionality and have a number of design problems. The fact that many of constructors and methods of java.util.Date are…