common Java samples