Socrates was convicted and taken upon the charges of "inventing new deities", "not recognizing the gods recognized by the state" and "corrupting the youth" with his ideas.
His "Apology" speech is rather an argument in his defense rather than an apology.
As he concludes his speech, Socrates does reflect optimism to his audience, as he claims that a "good man has nothing to fear, either in this life or the next."
His final words were: "Well, now it is time to be off, I to die and you to live; but which of us has the happier prospect is unknown to anyone but God"