Respuesta :
I think that the literary device used in the title of Oscar Wilde´s play is Pun.
A pun is a play on words that produces a humorous effect by using words that suggest two or more meanigns or by exploiting similiar sounding words with different meanings.
In the title "The Importance of Being Earnest" there is a pun in the word Earnest because it is a synonim of honest and sincere and sounds like Ernest, the firstly false name that the principal character, Jack used to have another life far away of his obligations.
I hope that this answer help you. Greetings.