From an O.Henry short story:
"Man is too thoroughly an egoist not to be also an egotist; "

An egoist has a good opinion of himself, an egotist flaunts it.