Misc java snippets relevant to OCJP exam