A Singapore court on Thursday sentenced two young German men to nine months in prison and three strokes of the cane for spray-painting a metro train in the city-state last year.