YOU can NOT change him...... YOU can only change YOURSELF. Sorry but if he is not willing to change then chances are he will continue to do what it is he did so the only solution if you want to stay with him is find a way of putting up with it.
Something my boyfriend does, he knows severely irritates me. Have had issues with this in the past, but he went ahead and did it again today. I asked him why, he said, he likes doing it. How can I tell him there will be consequences if he keeps it up?
Tell him what you are going to do if he does it again.
Is it rude, inconsiderate, dangerous, unwise, etc, or is it just something that ticks you off and wouldn't bother someone else?
That information would be important to how I answer this question.
Like everyone else said, tell him there's consequences
We all have choices in our relationships. To me, this is a deal-breaker. He's so immature, he'd rather annoy the crap out of you so he can get a reaction rather than stop doing it because it bothers you.
I have zippo tolerance for rude, immature people.
John, I have come to realize that you enjoy startling me all the time, by doing _________. You and I have talked about it but it doesn't seem like you care about my feelings in this.
This has now become a deal-breaker for me, because of your lack of respect and your immaturity. Should you continue to do ______, I will give my notice to the landlord and will begin looking for another place to stay. It will be hard to make this move because I care about you - but this immaturity and lack of respect has forced my hand.
If you say you're going to do something, then stick to it - otherwise, it's just empty threats and he will continue to act like an uncivilized baboon.