It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "O young men! Whoever among you is able to marry should marry, for it is more effective in lowering the gaze and guarding the private parts. And whoever is not able should fast, for it is a shield (curbing desire) for him."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10132