few more java snippets