Added java snippets