Act 2, like all of The Importance of Being Earnest, contains many examples of irony. I will cite a few of these and discuss how they contribute to the humor of the play.
One early example is when Cecily is telling Algernon about her diary. She tells him she can't read the diary because "it is simply a very young girl's record of her own thoughts and impressions, and consequently meant for publication." This is an example of verbal irony because Cecily describes her diary, which is a document people use to record their private, secret thoughts, as something Algernon cannot see because it is "meant for publication." This is the opposite of what we expect to hear about diaries in general, and also opposite of what we expect Cecily to say given the beginning of her statement. Both Cecily and Gwendolen use their diaries as "proof" of their engagements, so they are ironically referred to as public documents at other points in the play.
Cecily also talks to Algernon about his name, which he...
(The entire section contains 2 answers and 801 words.)