added some java snippets