Java samples in use