snippet - Train Schedule example – Java snippet