What is an example of a pun in literature?
A lot of character names are puns.
Most of us outgrow the need to give characters names like Ben Dover or Amanda Hugginkiss. Fortunately, the heavyweights of literature are less constrained.
Thomas Pynchon gave us Oedipa Maas and Manny DiPresso. Truman Capote gave us Holly Golightly. Ian Fleming gave us so many ghastly female names that he'd be in a league of his own, but his status as a literary heavyweight is in a bit of doubt.
The Beggar's Opera has lots of characters with names like Polly Peachum and Sukey Tawdrey. Terry Southern gave us both Candy Christian and General Jack D. Ripper (They can't all be subtle masterpieces).
I haven't even gotten to Dickens and Twain yet.