Add java code.

Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>