Why would my ex boyfriend call himself a nice guy?

When I broke up with him, these were his last phrases:
''You'll never find anyone as great as me''
''I'm a nice guy''

Would would a guy praise himself. Why even call himself a nice guy? I thought nice people don't need to say they are but rather it's obvious by their actions.
Updates
+1 y
He seemed to always feel the need to impress others. He expected me to put likes and hearts on all of his FB posts, even if it was trivial, insignificant posts.
Why would my ex boyfriend call himself a nice guy?
Post Opinion