Male cats only stop spraying if you neuter them. Though they do calm down on it once they are around 2 years old, it is a method to mark territory and they might still do it if they feel they must.
( Personal Note: I have a feral unentered male cat, he used to spray very often once he was a year old. After regular discipline and allowing him to do it outside instead of inside, he has almost completely stopped. )