Java samples