update java output snippet