In Plato's "Apology" Socrates is defending himself against claims of corrupting minors, not believing in gods, and the teaching of supernatural beings. He begins his defense by saying that his prosecutors are lying, and that he will prove it. He decides to defend himself chronologically beginning with the time that his childhood friend, Chairephon, went to Delphi and asked the oracle if there was anybody wiser than Socrates. When the oracle said that there was not, Socrates began to question those that were thought to be wise and prove that they were not. He did not do this because of arrogance, but because he thought that he was not wise at all and he wanted to prove the oracle wrong. He finally came to the conclusion that he was wiser only than those who thought themselves to be wise:
"I am wiser than this man; it is likely that neither of us knows anything worthwhile, but he thinks he knows something when he does not, whereas when I do not know, neither do I think I know; so I am likely to be wiser than he to this small extent, that I do not think I know what I do not know."
By Socrates proving many people unwise including politicians and poets who were widely known to be wise he caused many people to dislike like him.
Next, he attempts to prove his innocence. Through a conversation with Meletus, he shows that the charge of corrupting the minds of the young is irrelevant because everyone affects the young in some way. As for the charge of not believing in gods, it is contradictory to the charge of teaching of supernatural beings. However it is the public's hatred of him that he believes will condemn him.
After Socrates' defense the jury gives the verdict of guilty and Meletus ask for the death penalty. Socrates claims to not be distressed by the result because he expected it. The only thing he was surprised about was how close the verdict was.
Socrates shows that he does not fear death because he does not know if it is good or bad. He says that he would rather choose death over imprisonment because he knows that prison is evil but does not know about death:
What should I fear? That I should suffer the penalty that Meletus assessed against me, of which I say I do not know is good or bad? Am I then to choose in preference to this something that I know very well to be an evil...
Socrates also says that he would prefer death to being exiled. He knows that if he were to go to other cities that he would be thought of in the same way because of his teachings. When the citizens ask him why he would not go somewhere else and live quietly without teaching, he responds;
...I say that it is the greatest good for a man to discuss virtue every day... for the unexamined life is not wirth living...
The jury nevertheless sentences Socrates to death and he once again shows that he is not afraid of death. He says that he was convicted not because he was unable to convince the jury that he was innocent, but because he refused to use a defense that would lessen his self-respect and pride by telling the jury what they wanted to hear. He said that he would "much rather die after this kinnd of defense than live after making the other kind".
I agree with Socrates' view of death. He proves multiple times that he is gaining more than he is losing by accepting his fate. He shows that he is not afraid of death not only because he would rather die than face his other possible punishments, but because his morals are more important to him. He would rather die than escape death by "being caught by wickedness" and succumbing to his accusers.