Is apology used to mean the same thing in the next two sentences?

He wrote a letter of apology to the hostess.

The CEO made a public apology for the scandal, and promised full cooperation with the authorities.
the same meaning