Added java code