Java samples for