various sample java code