java sample code