Abd al-Rahman bin Yazid (may Allah have mercy on him) said: We went in to Sayyiduna Abdullah (may Allah be pleased with him) while Alqamah and al-Aswad were with him, and he narrated a hadith which I think he narrated only for my sake, as I was the youngest of the people. Sayyiduna Abdullah (may Allah be pleased with him) said: We were young men with the Messenger of Allah (peace and blessings be upon him) and had nothing, and he (peace and blessings be upon him) said: "O company of young men! Whoever among you is able to marry, let him marry, for it is more effective in lowering the gaze and guarding the private parts; and whoever among you is not able to marry, let him fast, for fasting is a shield for him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13447